<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/Python-3.6.2/Objects/dictobject.c</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/Python-3.6.2/Objects/dictobject.c</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="k">/* Dictionary object implementation using a hash table */</span>
<a name="2" /><span class="True">       2:</span> 
<a name="3" /><span class="True">       3:</span> <span class="k">/* The distribution includes a separate file, Objects/dictnotes.txt,</span>
<a name="4" /><span class="True">       4:</span> <span class="k">   describing explorations into dictionary design and optimization.</span>
<a name="5" /><span class="True">       5:</span> <span class="k">   It covers typical dictionary use patterns, the parameters for</span>
<a name="6" /><span class="True">       6:</span> <span class="k">   tuning dictionaries, and several ideas for possible optimizations.</span>
<a name="7" /><span class="True">       7:</span> <span class="k">*/</span>
<a name="8" /><span class="True">       8:</span> 
<a name="9" /><span class="True">       9:</span> <span class="k">/* PyDictKeysObject</span>
<a name="10" /><span class="True">      10:</span> <span class="k"></span>
<a name="11" /><span class="True">      11:</span> <span class="k">This implements the dictionary&apos;s hashtable.</span>
<a name="12" /><span class="True">      12:</span> <span class="k"></span>
<a name="13" /><span class="True">      13:</span> <span class="k">As of Python 3.6, this is compact and ordered. Basic idea is described here.</span>
<a name="14" /><span class="True">      14:</span> <span class="k">https://morepypy.blogspot.com/2015/01/faster-more-memory-efficient-and-more.html</span>
<a name="15" /><span class="True">      15:</span> <span class="k"></span>
<a name="16" /><span class="True">      16:</span> <span class="k">layout:</span>
<a name="17" /><span class="True">      17:</span> <span class="k"></span>
<a name="18" /><span class="True">      18:</span> <span class="k">+---------------+</span>
<a name="19" /><span class="True">      19:</span> <span class="k">| dk_refcnt     |</span>
<a name="20" /><span class="True">      20:</span> <span class="k">| dk_size       |</span>
<a name="21" /><span class="True">      21:</span> <span class="k">| dk_lookup     |</span>
<a name="22" /><span class="True">      22:</span> <span class="k">| dk_usable     |</span>
<a name="23" /><span class="True">      23:</span> <span class="k">| dk_nentries   |</span>
<a name="24" /><span class="True">      24:</span> <span class="k">+---------------+</span>
<a name="25" /><span class="True">      25:</span> <span class="k">| dk_indices    |</span>
<a name="26" /><span class="True">      26:</span> <span class="k">|               |</span>
<a name="27" /><span class="True">      27:</span> <span class="k">+---------------+</span>
<a name="28" /><span class="True">      28:</span> <span class="k">| dk_entries    |</span>
<a name="29" /><span class="True">      29:</span> <span class="k">|               |</span>
<a name="30" /><span class="True">      30:</span> <span class="k">+---------------+</span>
<a name="31" /><span class="True">      31:</span> <span class="k"></span>
<a name="32" /><span class="True">      32:</span> <span class="k">dk_indices is actual hashtable.  It holds index in entries, or DKIX_EMPTY(-1)</span>
<a name="33" /><span class="True">      33:</span> <span class="k">or DKIX_DUMMY(-2).</span>
<a name="34" /><span class="True">      34:</span> <span class="k">Size of indices is dk_size.  Type of each index in indices is vary on dk_size:</span>
<a name="35" /><span class="True">      35:</span> <span class="k"></span>
<a name="36" /><span class="True">      36:</span> <span class="k">* int8  for          dk_size &lt;= 128</span>
<a name="37" /><span class="True">      37:</span> <span class="k">* int16 for 256   &lt;= dk_size &lt;= 2**15</span>
<a name="38" /><span class="True">      38:</span> <span class="k">* int32 for 2**16 &lt;= dk_size &lt;= 2**31</span>
<a name="39" /><span class="True">      39:</span> <span class="k">* int64 for 2**32 &lt;= dk_size</span>
<a name="40" /><span class="True">      40:</span> <span class="k"></span>
<a name="41" /><span class="True">      41:</span> <span class="k">dk_entries is array of PyDictKeyEntry.  It&apos;s size is USABLE_FRACTION(dk_size).</span>
<a name="42" /><span class="True">      42:</span> <span class="k">DK_ENTRIES(dk) can be used to get pointer to entries.</span>
<a name="43" /><span class="True">      43:</span> <span class="k"></span>
<a name="44" /><span class="True">      44:</span> <span class="k">NOTE: Since negative value is used for DKIX_EMPTY and DKIX_DUMMY, type of</span>
<a name="45" /><span class="True">      45:</span> <span class="k">dk_indices entry is signed integer and int16 is used for table which</span>
<a name="46" /><span class="True">      46:</span> <span class="k">dk_size == 256.</span>
<a name="47" /><span class="True">      47:</span> <span class="k">*/</span>
<a name="48" /><span class="True">      48:</span> 
<a name="49" /><span class="True">      49:</span> 
<a name="50" /><span class="True">      50:</span> <span class="k">/*</span>
<a name="51" /><span class="True">      51:</span> <span class="k">The DictObject can be in one of two forms.</span>
<a name="52" /><span class="True">      52:</span> <span class="k"></span>
<a name="53" /><span class="True">      53:</span> <span class="k">Either:</span>
<a name="54" /><span class="True">      54:</span> <span class="k">  A combined table:</span>
<a name="55" /><span class="True">      55:</span> <span class="k">    ma_values == NULL, dk_refcnt == 1.</span>
<a name="56" /><span class="True">      56:</span> <span class="k">    Values are stored in the me_value field of the PyDictKeysObject.</span>
<a name="57" /><span class="True">      57:</span> <span class="k">Or:</span>
<a name="58" /><span class="True">      58:</span> <span class="k">  A split table:</span>
<a name="59" /><span class="True">      59:</span> <span class="k">    ma_values != NULL, dk_refcnt &gt;= 1</span>
<a name="60" /><span class="True">      60:</span> <span class="k">    Values are stored in the ma_values array.</span>
<a name="61" /><span class="True">      61:</span> <span class="k">    Only string (unicode) keys are allowed.</span>
<a name="62" /><span class="True">      62:</span> <span class="k">    All dicts sharing same key must have same insertion order.</span>
<a name="63" /><span class="True">      63:</span> <span class="k"></span>
<a name="64" /><span class="True">      64:</span> <span class="k">There are four kinds of slots in the table (slot is index, and</span>
<a name="65" /><span class="True">      65:</span> <span class="k">DK_ENTRIES(keys)[index] if index &gt;= 0):</span>
<a name="66" /><span class="True">      66:</span> <span class="k"></span>
<a name="67" /><span class="True">      67:</span> <span class="k">1. Unused.  index == DKIX_EMPTY</span>
<a name="68" /><span class="True">      68:</span> <span class="k">   Does not hold an active (key, value) pair now and never did.  Unused can</span>
<a name="69" /><span class="True">      69:</span> <span class="k">   transition to Active upon key insertion.  This is each slot&apos;s initial state.</span>
<a name="70" /><span class="True">      70:</span> <span class="k"></span>
<a name="71" /><span class="True">      71:</span> <span class="k">2. Active.  index &gt;= 0, me_key != NULL and me_value != NULL</span>
<a name="72" /><span class="True">      72:</span> <span class="k">   Holds an active (key, value) pair.  Active can transition to Dummy or</span>
<a name="73" /><span class="True">      73:</span> <span class="k">   Pending upon key deletion (for combined and split tables respectively).</span>
<a name="74" /><span class="True">      74:</span> <span class="k">   This is the only case in which me_value != NULL.</span>
<a name="75" /><span class="True">      75:</span> <span class="k"></span>
<a name="76" /><span class="True">      76:</span> <span class="k">3. Dummy.  index == DKIX_DUMMY  (combined only)</span>
<a name="77" /><span class="True">      77:</span> <span class="k">   Previously held an active (key, value) pair, but that was deleted and an</span>
<a name="78" /><span class="True">      78:</span> <span class="k">   active pair has not yet overwritten the slot.  Dummy can transition to</span>
<a name="79" /><span class="True">      79:</span> <span class="k">   Active upon key insertion.  Dummy slots cannot be made Unused again</span>
<a name="80" /><span class="True">      80:</span> <span class="k">   else the probe sequence in case of collision would have no way to know</span>
<a name="81" /><span class="True">      81:</span> <span class="k">   they were once active.</span>
<a name="82" /><span class="True">      82:</span> <span class="k"></span>
<a name="83" /><span class="True">      83:</span> <span class="k">4. Pending. index &gt;= 0, key != NULL, and value == NULL  (split only)</span>
<a name="84" /><span class="True">      84:</span> <span class="k">   Not yet inserted in split-table.</span>
<a name="85" /><span class="True">      85:</span> <span class="k">*/</span>
<a name="86" /><span class="True">      86:</span> 
<a name="87" /><span class="True">      87:</span> <span class="k">/*</span>
<a name="88" /><span class="True">      88:</span> <span class="k">Preserving insertion order</span>
<a name="89" /><span class="True">      89:</span> <span class="k"></span>
<a name="90" /><span class="True">      90:</span> <span class="k">It&apos;s simple for combined table.  Since dk_entries is mostly append only, we can</span>
<a name="91" /><span class="True">      91:</span> <span class="k">get insertion order by just iterating dk_entries.</span>
<a name="92" /><span class="True">      92:</span> <span class="k"></span>
<a name="93" /><span class="True">      93:</span> <span class="k">One exception is .popitem().  It removes last item in dk_entries and decrement</span>
<a name="94" /><span class="True">      94:</span> <span class="k">dk_nentries to achieve amortized O(1).  Since there are DKIX_DUMMY remains in</span>
<a name="95" /><span class="True">      95:</span> <span class="k">dk_indices, we can&apos;t increment dk_usable even though dk_nentries is</span>
<a name="96" /><span class="True">      96:</span> <span class="k">decremented.</span>
<a name="97" /><span class="True">      97:</span> <span class="k"></span>
<a name="98" /><span class="True">      98:</span> <span class="k">In split table, inserting into pending entry is allowed only for dk_entries[ix]</span>
<a name="99" /><span class="True">      99:</span> <span class="k">where ix == mp-&gt;ma_used. Inserting into other index and deleting item cause</span>
<a name="100" /><span class="True">     100:</span> <span class="k">converting the dict to the combined table.</span>
<a name="101" /><span class="True">     101:</span> <span class="k">*/</span>
<a name="102" /><span class="True">     102:</span> 
<a name="103" /><span class="True">     103:</span> <span class="k">/* PyDict_MINSIZE is the starting size for any new dict.</span>
<a name="104" /><span class="True">     104:</span> <span class="k"> * 8 allows dicts with no more than 5 active entries; experiments suggested</span>
<a name="105" /><span class="True">     105:</span> <span class="k"> * this suffices for the majority of dicts (consisting mostly of usually-small</span>
<a name="106" /><span class="True">     106:</span> <span class="k"> * dicts created to pass keyword arguments).</span>
<a name="107" /><span class="True">     107:</span> <span class="k"> * Making this 8, rather than 4 reduces the number of resizes for most</span>
<a name="108" /><span class="True">     108:</span> <span class="k"> * dictionaries, without any significant extra memory use.</span>
<a name="109" /><span class="True">     109:</span> <span class="k"> */</span>
<a name="110" /><span class="True">     110:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_UHlEaWN0X01JTlNJWkVfMA__"><span class="b">PyDict_MINSIZE</span></a> <span class="c">8</span>
<a name="111" /><span class="True">     111:</span> 
<a name="112" /><span class="True">     112:</span> <span class="f">#</span><span class="n">include</span> <span class="e">&quot;Python.h&quot;</span>
<a name="113" /><span class="True">     113:</span> <span class="f">#</span><span class="n">include</span> <span class="e">&quot;dict-common.h&quot;</span>
<a name="114" /><span class="True">     114:</span> <span class="f">#</span><span class="n">include</span> <span class="e">&quot;stringlib/eq.h&quot;</span>    <span class="k">/* to get unicode_eq() */</span>
<a name="115" /><span class="True">     115:</span> 
<a name="116" /><span class="True">     116:</span> <span class="k">/*[clinic input]</span>
<a name="117" /><span class="True">     117:</span> <span class="k">class dict &quot;PyDictObject *&quot; &quot;&amp;PyDict_Type&quot;</span>
<a name="118" /><span class="True">     118:</span> <span class="k">[clinic start generated code]*/</span>
<a name="119" /><span class="True">     119:</span> <span class="k">/*[clinic end generated code: output=da39a3ee5e6b4b0d input=f157a5a0ce9589d6]*/</span>
<a name="120" /><span class="True">     120:</span> 
<a name="121" /><span class="True">     121:</span> 
<a name="122" /><span class="True">     122:</span> <span class="k">/*</span>
<a name="123" /><span class="True">     123:</span> <span class="k">To ensure the lookup algorithm terminates, there must be at least one Unused</span>
<a name="124" /><span class="True">     124:</span> <span class="k">slot (NULL key) in the table.</span>
<a name="125" /><span class="True">     125:</span> <span class="k">To avoid slowing down lookups on a near-full table, we resize the table when</span>
<a name="126" /><span class="True">     126:</span> <span class="k">it&apos;s USABLE_FRACTION (currently two-thirds) full.</span>
<a name="127" /><span class="True">     127:</span> <span class="k">*/</span>
<a name="128" /><span class="True">     128:</span> 
<a name="129" /><span class="True">     129:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_UEVSVFVSQl9TSElGVF8w"><span class="b">PERTURB_SHIFT</span></a> <span class="c">5</span>
<a name="130" /><span class="True">     130:</span> 
<a name="131" /><span class="True">     131:</span> <span class="k">/*</span>
<a name="132" /><span class="True">     132:</span> <span class="k">Major subtleties ahead:  Most hash schemes depend on having a &quot;good&quot; hash</span>
<a name="133" /><span class="True">     133:</span> <span class="k">function, in the sense of simulating randomness.  Python doesn&apos;t:  its most</span>
<a name="134" /><span class="True">     134:</span> <span class="k">important hash functions (for ints) are very regular in common</span>
<a name="135" /><span class="True">     135:</span> <span class="k">cases:</span>
<a name="136" /><span class="True">     136:</span> <span class="k"></span>
<a name="137" /><span class="True">     137:</span> <span class="k">  &gt;&gt;&gt;[hash(i) for i in range(4)]</span>
<a name="138" /><span class="True">     138:</span> <span class="k">  [0, 1, 2, 3]</span>
<a name="139" /><span class="True">     139:</span> <span class="k"></span>
<a name="140" /><span class="True">     140:</span> <span class="k">This isn&apos;t necessarily bad!  To the contrary, in a table of size 2**i, taking</span>
<a name="141" /><span class="True">     141:</span> <span class="k">the low-order i bits as the initial table index is extremely fast, and there</span>
<a name="142" /><span class="True">     142:</span> <span class="k">are no collisions at all for dicts indexed by a contiguous range of ints. So</span>
<a name="143" /><span class="True">     143:</span> <span class="k">this gives better-than-random behavior in common cases, and that&apos;s very</span>
<a name="144" /><span class="True">     144:</span> <span class="k">desirable.</span>
<a name="145" /><span class="True">     145:</span> <span class="k"></span>
<a name="146" /><span class="True">     146:</span> <span class="k">OTOH, when collisions occur, the tendency to fill contiguous slices of the</span>
<a name="147" /><span class="True">     147:</span> <span class="k">hash table makes a good collision resolution strategy crucial.  Taking only</span>
<a name="148" /><span class="True">     148:</span> <span class="k">the last i bits of the hash code is also vulnerable:  for example, consider</span>
<a name="149" /><span class="True">     149:</span> <span class="k">the list [i &lt;&lt; 16 for i in range(20000)] as a set of keys.  Since ints are</span>
<a name="150" /><span class="True">     150:</span> <span class="k">their own hash codes, and this fits in a dict of size 2**15, the last 15 bits</span>
<a name="151" /><span class="True">     151:</span> <span class="k"> of every hash code are all 0:  they *all* map to the same table index.</span>
<a name="152" /><span class="True">     152:</span> <span class="k"></span>
<a name="153" /><span class="True">     153:</span> <span class="k">But catering to unusual cases should not slow the usual ones, so we just take</span>
<a name="154" /><span class="True">     154:</span> <span class="k">the last i bits anyway.  It&apos;s up to collision resolution to do the rest.  If</span>
<a name="155" /><span class="True">     155:</span> <span class="k">we *usually* find the key we&apos;re looking for on the first try (and, it turns</span>
<a name="156" /><span class="True">     156:</span> <span class="k">out, we usually do -- the table load factor is kept under 2/3, so the odds</span>
<a name="157" /><span class="True">     157:</span> <span class="k">are solidly in our favor), then it makes best sense to keep the initial index</span>
<a name="158" /><span class="True">     158:</span> <span class="k">computation dirt cheap.</span>
<a name="159" /><span class="True">     159:</span> <span class="k"></span>
<a name="160" /><span class="True">     160:</span> <span class="k">The first half of collision resolution is to visit table indices via this</span>
<a name="161" /><span class="True">     161:</span> <span class="k">recurrence:</span>
<a name="162" /><span class="True">     162:</span> <span class="k"></span>
<a name="163" /><span class="True">     163:</span> <span class="k">    j = ((5*j) + 1) mod 2**i</span>
<a name="164" /><span class="True">     164:</span> <span class="k"></span>
<a name="165" /><span class="True">     165:</span> <span class="k">For any initial j in range(2**i), repeating that 2**i times generates each</span>
<a name="166" /><span class="True">     166:</span> <span class="k">int in range(2**i) exactly once (see any text on random-number generation for</span>
<a name="167" /><span class="True">     167:</span> <span class="k">proof).  By itself, this doesn&apos;t help much:  like linear probing (setting</span>
<a name="168" /><span class="True">     168:</span> <span class="k">j += 1, or j -= 1, on each loop trip), it scans the table entries in a fixed</span>
<a name="169" /><span class="True">     169:</span> <span class="k">order.  This would be bad, except that&apos;s not the only thing we do, and it&apos;s</span>
<a name="170" /><span class="True">     170:</span> <span class="k">actually *good* in the common cases where hash keys are consecutive.  In an</span>
<a name="171" /><span class="True">     171:</span> <span class="k">example that&apos;s really too small to make this entirely clear, for a table of</span>
<a name="172" /><span class="True">     172:</span> <span class="k">size 2**3 the order of indices is:</span>
<a name="173" /><span class="True">     173:</span> <span class="k"></span>
<a name="174" /><span class="True">     174:</span> <span class="k">    0 -&gt; 1 -&gt; 6 -&gt; 7 -&gt; 4 -&gt; 5 -&gt; 2 -&gt; 3 -&gt; 0 [and here it&apos;s repeating]</span>
<a name="175" /><span class="True">     175:</span> <span class="k"></span>
<a name="176" /><span class="True">     176:</span> <span class="k">If two things come in at index 5, the first place we look after is index 2,</span>
<a name="177" /><span class="True">     177:</span> <span class="k">not 6, so if another comes in at index 6 the collision at 5 didn&apos;t hurt it.</span>
<a name="178" /><span class="True">     178:</span> <span class="k">Linear probing is deadly in this case because there the fixed probe order</span>
<a name="179" /><span class="True">     179:</span> <span class="k">is the *same* as the order consecutive keys are likely to arrive.  But it&apos;s</span>
<a name="180" /><span class="True">     180:</span> <span class="k">extremely unlikely hash codes will follow a 5*j+1 recurrence by accident,</span>
<a name="181" /><span class="True">     181:</span> <span class="k">and certain that consecutive hash codes do not.</span>
<a name="182" /><span class="True">     182:</span> <span class="k"></span>
<a name="183" /><span class="True">     183:</span> <span class="k">The other half of the strategy is to get the other bits of the hash code</span>
<a name="184" /><span class="True">     184:</span> <span class="k">into play.  This is done by initializing a (unsigned) vrbl &quot;perturb&quot; to the</span>
<a name="185" /><span class="True">     185:</span> <span class="k">full hash code, and changing the recurrence to:</span>
<a name="186" /><span class="True">     186:</span> <span class="k"></span>
<a name="187" /><span class="True">     187:</span> <span class="k">    perturb &gt;&gt;= PERTURB_SHIFT;</span>
<a name="188" /><span class="True">     188:</span> <span class="k">    j = (5*j) + 1 + perturb;</span>
<a name="189" /><span class="True">     189:</span> <span class="k">    use j % 2**i as the next table index;</span>
<a name="190" /><span class="True">     190:</span> <span class="k"></span>
<a name="191" /><span class="True">     191:</span> <span class="k">Now the probe sequence depends (eventually) on every bit in the hash code,</span>
<a name="192" /><span class="True">     192:</span> <span class="k">and the pseudo-scrambling property of recurring on 5*j+1 is more valuable,</span>
<a name="193" /><span class="True">     193:</span> <span class="k">because it quickly magnifies small differences in the bits that didn&apos;t affect</span>
<a name="194" /><span class="True">     194:</span> <span class="k">the initial index.  Note that because perturb is unsigned, if the recurrence</span>
<a name="195" /><span class="True">     195:</span> <span class="k">is executed often enough perturb eventually becomes and remains 0.  At that</span>
<a name="196" /><span class="True">     196:</span> <span class="k">point (very rarely reached) the recurrence is on (just) 5*j+1 again, and</span>
<a name="197" /><span class="True">     197:</span> <span class="k">that&apos;s certain to find an empty slot eventually (since it generates every int</span>
<a name="198" /><span class="True">     198:</span> <span class="k">in range(2**i), and we make sure there&apos;s always at least one empty slot).</span>
<a name="199" /><span class="True">     199:</span> <span class="k"></span>
<a name="200" /><span class="True">     200:</span> <span class="k">Selecting a good value for PERTURB_SHIFT is a balancing act.  You want it</span>
<a name="201" /><span class="True">     201:</span> <span class="k">small so that the high bits of the hash code continue to affect the probe</span>
<a name="202" /><span class="True">     202:</span> <span class="k">sequence across iterations; but you want it large so that in really bad cases</span>
<a name="203" /><span class="True">     203:</span> <span class="k">the high-order hash bits have an effect on early iterations.  5 was &quot;the</span>
<a name="204" /><span class="True">     204:</span> <span class="k">best&quot; in minimizing total collisions across experiments Tim Peters ran (on</span>
<a name="205" /><span class="True">     205:</span> <span class="k">both normal and pathological cases), but 4 and 6 weren&apos;t significantly worse.</span>
<a name="206" /><span class="True">     206:</span> <span class="k"></span>
<a name="207" /><span class="True">     207:</span> <span class="k">Historical: Reimer Behrends contributed the idea of using a polynomial-based</span>
<a name="208" /><span class="True">     208:</span> <span class="k">approach, using repeated multiplication by x in GF(2**n) where an irreducible</span>
<a name="209" /><span class="True">     209:</span> <span class="k">polynomial for each table size was chosen such that x was a primitive root.</span>
<a name="210" /><span class="True">     210:</span> <span class="k">Christian Tismer later extended that to use division by x instead, as an</span>
<a name="211" /><span class="True">     211:</span> <span class="k">efficient way to get the high bits of the hash code into play.  This scheme</span>
<a name="212" /><span class="True">     212:</span> <span class="k">also gave excellent collision statistics, but was more expensive:  two</span>
<a name="213" /><span class="True">     213:</span> <span class="k">if-tests were required inside the loop; computing &quot;the next&quot; index took about</span>
<a name="214" /><span class="True">     214:</span> <span class="k">the same number of operations but without as much potential parallelism</span>
<a name="215" /><span class="True">     215:</span> <span class="k">(e.g., computing 5*j can go on at the same time as computing 1+perturb in the</span>
<a name="216" /><span class="True">     216:</span> <span class="k">above, and then shifting perturb can be done while the table index is being</span>
<a name="217" /><span class="True">     217:</span> <span class="k">masked); and the PyDictObject struct required a member to hold the table&apos;s</span>
<a name="218" /><span class="True">     218:</span> <span class="k">polynomial.  In Tim&apos;s experiments the current scheme ran faster, produced</span>
<a name="219" /><span class="True">     219:</span> <span class="k">equally good collision statistics, needed less code &amp; used less memory.</span>
<a name="220" /><span class="True">     220:</span> <span class="k"></span>
<a name="221" /><span class="True">     221:</span> <span class="k">*/</span>
<a name="222" /><span class="True">     222:</span> 
<a name="223" /><span class="True">     223:</span> <span class="k">/* forward declarations */</span>
<a name="224" /><a href="dictobject.c.html#224"><span class="True">     224:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span> <span class="b">lookdict</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span>
<a name="225" /><a href="dictobject.c.html#225"><span class="True">     225:</span></a>                            <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">,</span>
<a name="226" /><a href="dictobject.c.html#226"><span class="True">     226:</span></a>                            <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="227" /><a href="dictobject.c.html#227"><span class="True">     227:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span> <span class="b">lookdict_unicode</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span>
<a name="228" /><a href="dictobject.c.html#228"><span class="True">     228:</span></a>                                    <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">,</span>
<a name="229" /><a href="dictobject.c.html#229"><span class="True">     229:</span></a>                                    <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="230" /><a href="dictobject.c.html#230"><span class="True">     230:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span>
<a name="231" /><a href="dictobject.c.html#231"><span class="True">     231:</span></a> <span class="b">lookdict_unicode_nodummy</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span>
<a name="232" /><a href="dictobject.c.html#232"><span class="True">     232:</span></a>                          <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">,</span>
<a name="233" /><a href="dictobject.c.html#233"><span class="True">     233:</span></a>                          <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="234" /><a href="dictobject.c.html#234"><span class="True">     234:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span> <span class="b">lookdict_split</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span>
<a name="235" /><a href="dictobject.c.html#235"><span class="True">     235:</span></a>                                  <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">,</span>
<a name="236" /><a href="dictobject.c.html#236"><span class="True">     236:</span></a>                                  <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="237" /><span class="True">     237:</span> 
<a name="238" /><a href="dictobject.c.html#238"><span class="True">     238:</span></a> <span class="m">static</span> <span class="m">int</span> <span class="b">dictresize</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="b">minused</span><span class="f">)</span><span class="f">;</span>
<a name="239" /><span class="True">     239:</span> 
<a name="240" /><span class="True">     240:</span> <span class="k">/*Global counter used to set ma_version_tag field of dictionary.</span>
<a name="241" /><span class="True">     241:</span> <span class="k"> * It is incremented each time that a dictionary is created and each</span>
<a name="242" /><span class="True">     242:</span> <span class="k"> * time that a dictionary is modified. */</span>
<a name="243" /><a href="dictobject.c.html#243"><span class="True">     243:</span></a> <span class="m">static</span> <span class="b">uint64_t</span> <span class="b">pydict_global_version</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="244" /><span class="True">     244:</span> 
<a name="245" /><span class="True">     245:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span> <span class="f">(</span><span class="f">++</span><span class="b">pydict_global_version</span><span class="f">)</span>
<a name="246" /><span class="True">     246:</span> 
<a name="247" /><span class="True">     247:</span> <span class="k">/* Dictionary reuse scheme to save calls to malloc and free */</span>
<a name="248" /><span class="True">     248:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="macros_ref.html#_UHlEaWN0X01BWEZSRUVMSVNUXzA_"><span class="b">PyDict_MAXFREELIST</span></a>
<a name="249" /><span class="True">     249:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_UHlEaWN0X01BWEZSRUVMSVNUXzA_"><span class="b">PyDict_MAXFREELIST</span></a> <span class="c">80</span>
<a name="250" /><span class="True">     250:</span> <span class="f">#</span><span class="n">endif</span>
<a name="251" /><a href="dictobject.c.html#251"><span class="True">     251:</span></a> <span class="m">static</span> <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">free_list</span><span class="f">[</span><a href="macros_ref.html#_UHlEaWN0X01BWEZSRUVMSVNUXzA_"><span class="b">PyDict_MAXFREELIST</span></a><span class="f">]</span><span class="f">;</span>
<a name="252" /><a href="dictobject.c.html#252"><span class="True">     252:</span></a> <span class="m">static</span> <span class="m">int</span> <span class="b">numfree</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="253" /><a href="dictobject.c.html#253"><span class="True">     253:</span></a> <span class="m">static</span> <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys_free_list</span><span class="f">[</span><a href="macros_ref.html#_UHlEaWN0X01BWEZSRUVMSVNUXzA_"><span class="b">PyDict_MAXFREELIST</span></a><span class="f">]</span><span class="f">;</span>
<a name="254" /><a href="dictobject.c.html#254"><span class="True">     254:</span></a> <span class="m">static</span> <span class="m">int</span> <span class="b">numfreekeys</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="255" /><span class="True">     255:</span> 
<a name="256" /><span class="True">     256:</span> <span class="f">#</span><span class="n">include</span> <span class="e">&quot;clinic/dictobject.c.h&quot;</span>
<a name="257" /><span class="True">     257:</span> 
<a name="258" /><a href="dictobject.c.html#258"><span class="True">     258:</span></a> <span class="m">int</span>
<a name="259" /><a href="dictobject.c.html#259"><span class="True">     259:</span></a> <span class="b">PyDict_ClearFreeList</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="260" /><a href="dictobject.c.html#260"><span class="True">     260:</span></a> <span class="f">{</span>
<a name="261" /><a href="dictobject.c.html#261"><span class="True">     261:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">op</span><span class="f">;</span>
<a name="262" /><a href="dictobject.c.html#262"><span class="True">     262:</span></a>     <span class="m">int</span> <span class="b">ret</span> <span class="f">=</span> <span class="b">numfree</span> <span class="f">+</span> <span class="b">numfreekeys</span><span class="f">;</span>
<a name="263" /><a href="dictobject.c.html#263"><span class="True">     263:</span></a>     <span class="m">while</span> <span class="f">(</span><span class="b">numfree</span><span class="f">)</span> <span class="f">{</span>
<a name="264" /><a href="dictobject.c.html#264"><span class="True">     264:</span></a>         <span class="b">op</span> <span class="f">=</span> <span class="b">free_list</span><span class="f">[</span><span class="f">--</span><span class="b">numfree</span><span class="f">]</span><span class="f">;</span>
<a name="265" /><a href="dictobject.c.html#265"><span class="True">     265:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrRXhhY3RfMA__"><span class="b">PyDict_CheckExact</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="266" /><a href="dictobject.c.html#266"><span class="True">     266:</span></a>         <span class="b">PyObject_GC_Del</span><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">;</span>
<a name="267" /><a href="dictobject.c.html#267"><span class="True">     267:</span></a>     <span class="f">}</span>
<a name="268" /><a href="dictobject.c.html#268"><span class="True">     268:</span></a>     <span class="m">while</span> <span class="f">(</span><span class="b">numfreekeys</span><span class="f">)</span> <span class="f">{</span>
<a name="269" /><a href="dictobject.c.html#269"><span class="True">     269:</span></a>         <a href="macros_ref.html#_UHlPYmplY3RfRlJFRV8w"><span class="b">PyObject_FREE</span></a><span class="f">(</span><span class="b">keys_free_list</span><span class="f">[</span><span class="f">--</span><span class="b">numfreekeys</span><span class="f">]</span><span class="f">)</span><span class="f">;</span>
<a name="270" /><a href="dictobject.c.html#270"><span class="True">     270:</span></a>     <span class="f">}</span>
<a name="271" /><a href="dictobject.c.html#271"><span class="True">     271:</span></a>     <span class="m">return</span> <span class="b">ret</span><span class="f">;</span>
<a name="272" /><a href="dictobject.c.html#272"><span class="True">     272:</span></a> <span class="f">}</span>
<a name="273" /><span class="True">     273:</span> 
<a name="274" /><span class="True">     274:</span> <span class="k">/* Print summary info about the state of the optimized allocator */</span>
<a name="275" /><a href="dictobject.c.html#275"><span class="True">     275:</span></a> <span class="m">void</span>
<a name="276" /><a href="dictobject.c.html#276"><span class="True">     276:</span></a> <span class="b">_PyDict_DebugMallocStats</span><span class="f">(</span><span class="b">FILE</span> <span class="f">*</span><span class="b">out</span><span class="f">)</span>
<a name="277" /><a href="dictobject.c.html#277"><span class="True">     277:</span></a> <span class="f">{</span>
<a name="278" /><a href="dictobject.c.html#278"><span class="True">     278:</span></a>     <span class="b">_PyDebugAllocatorStats</span><span class="f">(</span><span class="b">out</span><span class="f">,</span>
<a name="279" /><a href="dictobject.c.html#279"><span class="True">     279:</span></a>                            <span class="e">&quot;free PyDictObject&quot;</span><span class="f">,</span> <span class="b">numfree</span><span class="f">,</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictObject</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="280" /><a href="dictobject.c.html#280"><span class="True">     280:</span></a> <span class="f">}</span>
<a name="281" /><span class="True">     281:</span> 
<a name="282" /><span class="True">     282:</span> 
<a name="283" /><a href="dictobject.c.html#283"><span class="True">     283:</span></a> <span class="m">void</span>
<a name="284" /><a href="dictobject.c.html#284"><span class="True">     284:</span></a> <span class="b">PyDict_Fini</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="285" /><a href="dictobject.c.html#285"><span class="True">     285:</span></a> <span class="f">{</span>
<a name="286" /><a href="dictobject.c.html#286"><span class="True">     286:</span></a>     <span class="b">PyDict_ClearFreeList</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="287" /><a href="dictobject.c.html#287"><span class="True">     287:</span></a> <span class="f">}</span>
<a name="288" /><span class="True">     288:</span> 
<a name="289" /><span class="True">     289:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="f">(</span><span class="f">(</span><span class="b">dk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dk_size</span><span class="f">)</span>
<a name="290" /><span class="True">     290:</span> <span class="f">#</span><span class="n">if</span> <a href="macros_ref.html#_U0laRU9GX1ZPSURfUF8w"><span class="b">SIZEOF_VOID_P</span></a> <span class="f">&gt;</span> <span class="c">4</span>
<a name="291" /><span class="True">     291:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_REtfSVhTSVpFXzA_"><span class="b">DK_IXSIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span>                          \
<a name="292" /><span class="True">     292:</span>     <span class="f">(</span><a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="f">&lt;=</span> <span class="c">0xff</span> <span class="f">?</span>                     \
<a name="293" /><span class="True">     293:</span>         <span class="c">1</span> <span class="f">:</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="f">&lt;=</span> <span class="c">0xffff</span> <span class="f">?</span>            \
<a name="294" /><span class="True">     294:</span>             <span class="c">2</span> <span class="f">:</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="f">&lt;=</span> <span class="c">0xffffffff</span> <span class="f">?</span>    \
<a name="295" /><span class="True">     295:</span>                 <span class="c">4</span> <span class="f">:</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">int64_t</span><span class="f">)</span><span class="f">)</span>
<a name="296" /><span class="False">     296:</span> <span class="f">#</span><span class="n">else</span>
<a name="297" /><span class="False">     297:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_REtfSVhTSVpFXzA_"><span class="b">DK_IXSIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span>                          \
<a name="298" /><span class="False">     298:</span>     <span class="f">(</span><a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="f">&lt;=</span> <span class="c">0xff</span> <span class="f">?</span>                     \
<a name="299" /><span class="False">     299:</span>         <span class="c">1</span> <span class="f">:</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="f">&lt;=</span> <span class="c">0xffff</span> <span class="f">?</span>            \
<a name="300" /><span class="False">     300:</span>             <span class="c">2</span> <span class="f">:</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">int32_t</span><span class="f">)</span><span class="f">)</span>
<a name="301" /><span class="True">     301:</span> <span class="f">#</span><span class="n">endif</span>
<a name="302" /><span class="True">     302:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> \
<a name="303" /><span class="True">     303:</span>     <span class="f">(</span><span class="f">(</span><span class="b">PyDictKeyEntry</span><span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="f">&amp;</span><span class="f">(</span><span class="b">dk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_1</span><span class="f">[</span><a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="f">*</span> <a href="macros_ref.html#_REtfSVhTSVpFXzA_"><span class="b">DK_IXSIZE</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span><span class="f">]</span><span class="f">)</span><span class="f">)</span>
<a name="304" /><span class="True">     304:</span> 
<a name="305" /><span class="True">     305:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_REtfREVCVUdfSU5DUkVGXzA_"><span class="b">DK_DEBUG_INCREF</span></a> <a href="macros_ref.html#_X1B5X0lOQ19SRUZUT1RBTF8w"><span class="b">_Py_INC_REFTOTAL</span></a> <a href="macros_ref.html#_X1B5X1JFRl9ERUJVR19DT01NQV8w"><span class="b">_Py_REF_DEBUG_COMMA</span></a>
<a name="306" /><span class="True">     306:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_REtfREVCVUdfREVDUkVGXzA_"><span class="b">DK_DEBUG_DECREF</span></a> <a href="macros_ref.html#_X1B5X0RFQ19SRUZUT1RBTF8w"><span class="b">_Py_DEC_REFTOTAL</span></a> <a href="macros_ref.html#_X1B5X1JFRl9ERUJVR19DT01NQV8w"><span class="b">_Py_REF_DEBUG_COMMA</span></a>
<a name="307" /><span class="True">     307:</span> 
<a name="308" /><span class="True">     308:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_REtfSU5DUkVGXzA_"><span class="b">DK_INCREF</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="f">(</span><a href="macros_ref.html#_REtfREVCVUdfSU5DUkVGXzA_"><span class="b">DK_DEBUG_INCREF</span></a> <span class="f">++</span><span class="f">(</span><span class="b">dk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span><span class="f">)</span>
<a name="309" /><span class="True">     309:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_REtfREVCVUdfREVDUkVGXzA_"><span class="b">DK_DEBUG_DECREF</span></a> <span class="f">(</span><span class="f">--</span><span class="f">(</span><span class="b">dk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span><span class="f">)</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span> <span class="b">free_keys_object</span><span class="f">(</span><span class="b">dk</span><span class="f">)</span>
<a name="310" /><span class="True">     310:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_REtfTUFTS18w"><span class="b">DK_MASK</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span> <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">dk</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">dk_size</span><span class="f">)</span><span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="311" /><span class="True">     311:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_SVNfUE9XRVJfT0ZfMl8w"><span class="b">IS_POWER_OF_2</span></a><span class="f">(</span><span class="b">x</span><span class="f">)</span> <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">x</span><span class="f">)</span> <span class="f">&amp;</span> <span class="f">(</span><span class="b">x</span><span class="f">-</span><span class="c">1</span><span class="f">)</span><span class="f">)</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span>
<a name="312" /><span class="True">     312:</span> 
<a name="313" /><span class="True">     313:</span> <span class="k">/* lookup indices.  returns DKIX_EMPTY, DKIX_DUMMY, or ix &gt;=0 */</span>
<a name="314" /><a href="dictobject.c.html#314"><span class="True">     314:</span></a> <span class="m">static</span> <span class="m">inline</span> <span class="b">Py_ssize_t</span>
<a name="315" /><a href="dictobject.c.html#315"><span class="True">     315:</span></a> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">)</span>
<a name="316" /><a href="dictobject.c.html#316"><span class="True">     316:</span></a> <span class="f">{</span>
<a name="317" /><a href="dictobject.c.html#317"><span class="True">     317:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">s</span> <span class="f">=</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="318" /><a href="dictobject.c.html#318"><span class="True">     318:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="319" /><span class="True">     319:</span> 
<a name="320" /><a href="dictobject.c.html#320"><span class="True">     320:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">s</span> <span class="f">&lt;=</span> <span class="c">0xff</span><span class="f">)</span> <span class="f">{</span>
<a name="321" /><a href="dictobject.c.html#321"><span class="True">     321:</span></a>         <span class="b">int8_t</span> <span class="f">*</span><span class="b">indices</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_1</span><span class="f">;</span>
<a name="322" /><a href="dictobject.c.html#322"><span class="True">     322:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">indices</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="323" /><a href="dictobject.c.html#323"><span class="True">     323:</span></a>     <span class="f">}</span>
<a name="324" /><a href="dictobject.c.html#324"><span class="True">     324:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">s</span> <span class="f">&lt;=</span> <span class="c">0xffff</span><span class="f">)</span> <span class="f">{</span>
<a name="325" /><a href="dictobject.c.html#325"><span class="True">     325:</span></a>         <span class="b">int16_t</span> <span class="f">*</span><span class="b">indices</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_2</span><span class="f">;</span>
<a name="326" /><a href="dictobject.c.html#326"><span class="True">     326:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">indices</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="327" /><a href="dictobject.c.html#327"><span class="True">     327:</span></a>     <span class="f">}</span>
<a name="328" /><span class="True">     328:</span> <span class="f">#</span><span class="n">if</span> <a href="macros_ref.html#_U0laRU9GX1ZPSURfUF8w"><span class="b">SIZEOF_VOID_P</span></a> <span class="f">&gt;</span> <span class="c">4</span>
<a name="329" /><a href="dictobject.c.html#329"><span class="True">     329:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">s</span> <span class="f">&gt;</span> <span class="c">0xffffffff</span><span class="f">)</span> <span class="f">{</span>
<a name="330" /><a href="dictobject.c.html#330"><span class="True">     330:</span></a>         <span class="b">int64_t</span> <span class="f">*</span><span class="b">indices</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_8</span><span class="f">;</span>
<a name="331" /><a href="dictobject.c.html#331"><span class="True">     331:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">indices</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="332" /><a href="dictobject.c.html#332"><span class="True">     332:</span></a>     <span class="f">}</span>
<a name="333" /><span class="True">     333:</span> <span class="f">#</span><span class="n">endif</span>
<a name="334" /><a href="dictobject.c.html#334"><span class="True">     334:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="335" /><a href="dictobject.c.html#335"><span class="True">     335:</span></a>         <span class="b">int32_t</span> <span class="f">*</span><span class="b">indices</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_4</span><span class="f">;</span>
<a name="336" /><a href="dictobject.c.html#336"><span class="True">     336:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">indices</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="337" /><a href="dictobject.c.html#337"><span class="True">     337:</span></a>     <span class="f">}</span>
<a name="338" /><a href="dictobject.c.html#338"><span class="True">     338:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span><span class="f">;</span>
<a name="339" /><a href="dictobject.c.html#339"><span class="True">     339:</span></a>     <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="340" /><a href="dictobject.c.html#340"><span class="True">     340:</span></a> <span class="f">}</span>
<a name="341" /><span class="True">     341:</span> 
<a name="342" /><span class="True">     342:</span> <span class="k">/* write to indices. */</span>
<a name="343" /><a href="dictobject.c.html#343"><span class="True">     343:</span></a> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span>
<a name="344" /><a href="dictobject.c.html#344"><span class="True">     344:</span></a> <span class="b">dk_set_index</span><span class="f">(</span><span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">)</span>
<a name="345" /><a href="dictobject.c.html#345"><span class="True">     345:</span></a> <span class="f">{</span>
<a name="346" /><a href="dictobject.c.html#346"><span class="True">     346:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">s</span> <span class="f">=</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="347" /><span class="True">     347:</span> 
<a name="348" /><a href="dictobject.c.html#348"><span class="True">     348:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span><span class="f">;</span>
<a name="349" /><span class="True">     349:</span> 
<a name="350" /><a href="dictobject.c.html#350"><span class="True">     350:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">s</span> <span class="f">&lt;=</span> <span class="c">0xff</span><span class="f">)</span> <span class="f">{</span>
<a name="351" /><a href="dictobject.c.html#351"><span class="True">     351:</span></a>         <span class="b">int8_t</span> <span class="f">*</span><span class="b">indices</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_1</span><span class="f">;</span>
<a name="352" /><a href="dictobject.c.html#352"><span class="True">     352:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&lt;=</span> <span class="c">0x7f</span><span class="f">)</span><span class="f">;</span>
<a name="353" /><a href="dictobject.c.html#353"><span class="True">     353:</span></a>         <span class="b">indices</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">=</span> <span class="f">(</span><span class="m">char</span><span class="f">)</span><span class="b">ix</span><span class="f">;</span>
<a name="354" /><a href="dictobject.c.html#354"><span class="True">     354:</span></a>     <span class="f">}</span>
<a name="355" /><a href="dictobject.c.html#355"><span class="True">     355:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">s</span> <span class="f">&lt;=</span> <span class="c">0xffff</span><span class="f">)</span> <span class="f">{</span>
<a name="356" /><a href="dictobject.c.html#356"><span class="True">     356:</span></a>         <span class="b">int16_t</span> <span class="f">*</span><span class="b">indices</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_2</span><span class="f">;</span>
<a name="357" /><a href="dictobject.c.html#357"><span class="True">     357:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&lt;=</span> <span class="c">0x7fff</span><span class="f">)</span><span class="f">;</span>
<a name="358" /><a href="dictobject.c.html#358"><span class="True">     358:</span></a>         <span class="b">indices</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">=</span> <span class="f">(</span><span class="b">int16_t</span><span class="f">)</span><span class="b">ix</span><span class="f">;</span>
<a name="359" /><a href="dictobject.c.html#359"><span class="True">     359:</span></a>     <span class="f">}</span>
<a name="360" /><span class="True">     360:</span> <span class="f">#</span><span class="n">if</span> <a href="macros_ref.html#_U0laRU9GX1ZPSURfUF8w"><span class="b">SIZEOF_VOID_P</span></a> <span class="f">&gt;</span> <span class="c">4</span>
<a name="361" /><a href="dictobject.c.html#361"><span class="True">     361:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">s</span> <span class="f">&gt;</span> <span class="c">0xffffffff</span><span class="f">)</span> <span class="f">{</span>
<a name="362" /><a href="dictobject.c.html#362"><span class="True">     362:</span></a>         <span class="b">int64_t</span> <span class="f">*</span><span class="b">indices</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_8</span><span class="f">;</span>
<a name="363" /><a href="dictobject.c.html#363"><span class="True">     363:</span></a>         <span class="b">indices</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">=</span> <span class="b">ix</span><span class="f">;</span>
<a name="364" /><a href="dictobject.c.html#364"><span class="True">     364:</span></a>     <span class="f">}</span>
<a name="365" /><span class="True">     365:</span> <span class="f">#</span><span class="n">endif</span>
<a name="366" /><a href="dictobject.c.html#366"><span class="True">     366:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="367" /><a href="dictobject.c.html#367"><span class="True">     367:</span></a>         <span class="b">int32_t</span> <span class="f">*</span><span class="b">indices</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_4</span><span class="f">;</span>
<a name="368" /><a href="dictobject.c.html#368"><span class="True">     368:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&lt;=</span> <span class="c">0x7fffffff</span><span class="f">)</span><span class="f">;</span>
<a name="369" /><a href="dictobject.c.html#369"><span class="True">     369:</span></a>         <span class="b">indices</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">=</span> <span class="f">(</span><span class="b">int32_t</span><span class="f">)</span><span class="b">ix</span><span class="f">;</span>
<a name="370" /><a href="dictobject.c.html#370"><span class="True">     370:</span></a>     <span class="f">}</span>
<a name="371" /><a href="dictobject.c.html#371"><span class="True">     371:</span></a> <span class="f">}</span>
<a name="372" /><span class="True">     372:</span> 
<a name="373" /><span class="True">     373:</span> 
<a name="374" /><span class="True">     374:</span> <span class="k">/* USABLE_FRACTION is the maximum dictionary load.</span>
<a name="375" /><span class="True">     375:</span> <span class="k"> * Increasing this ratio makes dictionaries more dense resulting in more</span>
<a name="376" /><span class="True">     376:</span> <span class="k"> * collisions.  Decreasing it improves sparseness at the expense of spreading</span>
<a name="377" /><span class="True">     377:</span> <span class="k"> * indices over more cache lines and at the cost of total memory consumed.</span>
<a name="378" /><span class="True">     378:</span> <span class="k"> *</span>
<a name="379" /><span class="True">     379:</span> <span class="k"> * USABLE_FRACTION must obey the following:</span>
<a name="380" /><span class="True">     380:</span> <span class="k"> *     (0 &lt; USABLE_FRACTION(n) &lt; n) for all n &gt;= 2</span>
<a name="381" /><span class="True">     381:</span> <span class="k"> *</span>
<a name="382" /><span class="True">     382:</span> <span class="k"> * USABLE_FRACTION should be quick to calculate.</span>
<a name="383" /><span class="True">     383:</span> <span class="k"> * Fractions around 1/2 to 2/3 seem to work well in practice.</span>
<a name="384" /><span class="True">     384:</span> <span class="k"> */</span>
<a name="385" /><span class="True">     385:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><span class="b">n</span><span class="f">)</span> <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">n</span><span class="f">)</span> <span class="f">&lt;&lt;</span> <span class="c">1</span><span class="f">)</span><span class="f">/</span><span class="c">3</span><span class="f">)</span>
<a name="386" /><span class="True">     386:</span> 
<a name="387" /><span class="True">     387:</span> <span class="k">/* ESTIMATE_SIZE is reverse function of USABLE_FRACTION.</span>
<a name="388" /><span class="True">     388:</span> <span class="k"> * This can be used to reserve enough size to insert n entries without</span>
<a name="389" /><span class="True">     389:</span> <span class="k"> * resizing.</span>
<a name="390" /><span class="True">     390:</span> <span class="k"> */</span>
<a name="391" /><span class="True">     391:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_RVNUSU1BVEVfU0laRV8w"><span class="b">ESTIMATE_SIZE</span></a><span class="f">(</span><span class="b">n</span><span class="f">)</span>  <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">n</span><span class="f">)</span><span class="f">*</span><span class="c">3</span><span class="f">+</span><span class="c">1</span><span class="f">)</span> <span class="f">&gt;&gt;</span> <span class="c">1</span><span class="f">)</span>
<a name="392" /><span class="True">     392:</span> 
<a name="393" /><span class="True">     393:</span> <span class="k">/* Alternative fraction that is otherwise close enough to 2n/3 to make</span>
<a name="394" /><span class="True">     394:</span> <span class="k"> * little difference. 8 * 2/3 == 8 * 5/8 == 5. 16 * 2/3 == 16 * 5/8 == 10.</span>
<a name="395" /><span class="True">     395:</span> <span class="k"> * 32 * 2/3 = 21, 32 * 5/8 = 20.</span>
<a name="396" /><span class="True">     396:</span> <span class="k"> * Its advantage is that it is faster to compute on machines with slow division.</span>
<a name="397" /><span class="True">     397:</span> <span class="k"> * #define USABLE_FRACTION(n) (((n) &gt;&gt; 1) + ((n) &gt;&gt; 2) - ((n) &gt;&gt; 3))</span>
<a name="398" /><span class="True">     398:</span> <span class="k"> */</span>
<a name="399" /><span class="True">     399:</span> 
<a name="400" /><span class="True">     400:</span> <span class="k">/* GROWTH_RATE. Growth rate upon hitting maximum load.</span>
<a name="401" /><span class="True">     401:</span> <span class="k"> * Currently set to used*2 + capacity/2.</span>
<a name="402" /><span class="True">     402:</span> <span class="k"> * This means that dicts double in size when growing without deletions,</span>
<a name="403" /><span class="True">     403:</span> <span class="k"> * but have more head room when the number of deletions is on a par with the</span>
<a name="404" /><span class="True">     404:</span> <span class="k"> * number of insertions.</span>
<a name="405" /><span class="True">     405:</span> <span class="k"> * Raising this to used*4 doubles memory consumption depending on the size of</span>
<a name="406" /><span class="True">     406:</span> <span class="k"> * the dictionary, but results in half the number of resizes, less effort to</span>
<a name="407" /><span class="True">     407:</span> <span class="k"> * resize.</span>
<a name="408" /><span class="True">     408:</span> <span class="k"> * GROWTH_RATE was set to used*4 up to version 3.2.</span>
<a name="409" /><span class="True">     409:</span> <span class="k"> * GROWTH_RATE was set to used*2 in version 3.3.0</span>
<a name="410" /><span class="True">     410:</span> <span class="k"> */</span>
<a name="411" /><span class="True">     411:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_R1JPV1RIX1JBVEVfMA__"><span class="b">GROWTH_RATE</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span> <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">*</span><span class="c">2</span><span class="f">)</span><span class="f">+</span><span class="f">(</span><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_size</span><span class="f">&gt;&gt;</span><span class="c">1</span><span class="f">)</span><span class="f">)</span>
<a name="412" /><span class="True">     412:</span> 
<a name="413" /><span class="True">     413:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_RU5TVVJFX0FMTE9XU19ERUxFVElPTlNfMA__"><span class="b">ENSURE_ALLOWS_DELETIONS</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span> \
<a name="414" /><span class="True">     414:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">==</span> <span class="b">lookdict_unicode_nodummy</span><span class="f">)</span> <span class="f">{</span> \
<a name="415" /><span class="True">     415:</span>         <span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">=</span> <span class="b">lookdict_unicode</span><span class="f">;</span> \
<a name="416" /><span class="True">     416:</span>     <span class="f">}</span>
<a name="417" /><span class="True">     417:</span> 
<a name="418" /><span class="True">     418:</span> <span class="k">/* This immutable, empty PyDictKeysObject is used for PyDict_Clear()</span>
<a name="419" /><span class="True">     419:</span> <span class="k"> * (which cannot fail and thus can do no allocation).</span>
<a name="420" /><span class="True">     420:</span> <span class="k"> */</span>
<a name="421" /><a href="dictobject.c.html#421"><span class="True">     421:</span></a> <span class="m">static</span> <span class="b">PyDictKeysObject</span> <span class="b">empty_keys_struct</span> <span class="f">=</span> <span class="f">{</span>
<a name="422" /><a href="dictobject.c.html#422"><span class="True">     422:</span></a>         <span class="c">1</span><span class="f">,</span> <span class="k">/* dk_refcnt */</span>
<a name="423" /><a href="dictobject.c.html#423"><span class="True">     423:</span></a>         <span class="c">1</span><span class="f">,</span> <span class="k">/* dk_size */</span>
<a name="424" /><a href="dictobject.c.html#424"><span class="True">     424:</span></a>         <span class="b">lookdict_split</span><span class="f">,</span> <span class="k">/* dk_lookup */</span>
<a name="425" /><a href="dictobject.c.html#425"><span class="True">     425:</span></a>         <span class="c">0</span><span class="f">,</span> <span class="k">/* dk_usable (immutable) */</span>
<a name="426" /><a href="dictobject.c.html#426"><span class="True">     426:</span></a>         <span class="c">0</span><span class="f">,</span> <span class="k">/* dk_nentries */</span>
<a name="427" /><a href="dictobject.c.html#427"><span class="True">     427:</span></a>         <span class="f">.</span><span class="b">dk_indices</span> <span class="f">=</span> <span class="f">{</span> <span class="f">.</span><span class="b">as_1</span> <span class="f">=</span> <span class="f">{</span><a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">,</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">,</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">,</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">,</span>
<a name="428" /><a href="dictobject.c.html#428"><span class="True">     428:</span></a>                                  <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">,</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">,</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">,</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">}</span><span class="f">}</span><span class="f">,</span>
<a name="429" /><a href="dictobject.c.html#429"><span class="True">     429:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="430" /><span class="True">     430:</span> 
<a name="431" /><a href="dictobject.c.html#431"><span class="True">     431:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">empty_values</span><span class="f">[</span><span class="c">1</span><span class="f">]</span> <span class="f">=</span> <span class="f">{</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">}</span><span class="f">;</span>
<a name="432" /><span class="True">     432:</span> 
<a name="433" /><span class="True">     433:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_UHlfRU1QVFlfS0VZU18w"><span class="b">Py_EMPTY_KEYS</span></a> <span class="f">&amp;</span><span class="b">empty_keys_struct</span>
<a name="434" /><span class="True">     434:</span> 
<a name="435" /><span class="True">     435:</span> <span class="k">/* Uncomment to check the dict content in _PyDict_CheckConsistency() */</span>
<a name="436" /><span class="True">     436:</span> <span class="k">/* #define DEBUG_PYDICT */</span>
<a name="437" /><span class="True">     437:</span> 
<a name="438" /><span class="True">     438:</span> 
<a name="439" /><span class="True">     439:</span> <span class="f">#</span><span class="n">ifndef</span> <span class="b">NDEBUG</span>
<a name="440" /><a href="dictobject.c.html#440"><span class="True">     440:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="441" /><a href="dictobject.c.html#441"><span class="True">     441:</span></a> <span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="442" /><a href="dictobject.c.html#442"><span class="True">     442:</span></a> <span class="f">{</span>
<a name="443" /><a href="dictobject.c.html#443"><span class="True">     443:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="444" /><a href="dictobject.c.html#444"><span class="True">     444:</span></a>     <span class="m">int</span> <span class="b">splitted</span> <span class="f">=</span> <a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="445" /><a href="dictobject.c.html#445"><span class="True">     445:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">usable</span> <span class="f">=</span> <a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_size</span><span class="f">)</span><span class="f">;</span>
<a name="446" /><span class="False">     446:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">DEBUG_PYDICT</span>
<a name="447" /><span class="False">     447:</span>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">entries</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="448" /><span class="False">     448:</span>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">;</span>
<a name="449" /><span class="True">     449:</span> <span class="f">#</span><span class="n">endif</span>
<a name="450" /><span class="True">     450:</span> 
<a name="451" /><a href="dictobject.c.html#451"><span class="True">     451:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span> <span class="f">&lt;=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">&amp;&amp;</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">&lt;=</span> <span class="b">usable</span><span class="f">)</span><span class="f">;</span>
<a name="452" /><a href="dictobject.c.html#452"><span class="True">     452:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_SVNfUE9XRVJfT0ZfMl8w"><span class="b">IS_POWER_OF_2</span></a><span class="f">(</span><span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_size</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="453" /><span class="True">     453:</span>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span> <span class="f">&lt;=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span>
<a name="454" /><a href="dictobject.c.html#454"><span class="True">     454:</span></a>            <span class="f">&amp;&amp;</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span> <span class="f">&lt;=</span> <span class="b">usable</span><span class="f">)</span><span class="f">;</span>
<a name="455" /><span class="True">     455:</span>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span> <span class="f">&lt;=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span>
<a name="456" /><a href="dictobject.c.html#456"><span class="True">     456:</span></a>            <span class="f">&amp;&amp;</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span> <span class="f">&lt;=</span> <span class="b">usable</span><span class="f">)</span><span class="f">;</span>
<a name="457" /><a href="dictobject.c.html#457"><span class="True">     457:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span> <span class="f">+</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span> <span class="f">&lt;=</span> <span class="b">usable</span><span class="f">)</span><span class="f">;</span>
<a name="458" /><span class="True">     458:</span> 
<a name="459" /><a href="dictobject.c.html#459"><span class="True">     459:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">splitted</span><span class="f">)</span> <span class="f">{</span>
<a name="460" /><span class="True">     460:</span>         <span class="k">/* combined table */</span>
<a name="461" /><a href="dictobject.c.html#461"><span class="True">     461:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="462" /><a href="dictobject.c.html#462"><span class="True">     462:</span></a>     <span class="f">}</span>
<a name="463" /><span class="True">     463:</span> 
<a name="464" /><span class="False">     464:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">DEBUG_PYDICT</span>
<a name="465" /><span class="False">     465:</span>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span><span class="f">=</span><span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_size</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="466" /><span class="False">     466:</span>         <span class="b">Py_ssize_t</span> <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">keys</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="467" /><span class="False">     467:</span>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a> <span class="f">&lt;=</span> <span class="b">ix</span> <span class="f">&amp;&amp;</span> <span class="b">ix</span> <span class="f">&lt;=</span> <span class="b">usable</span><span class="f">)</span><span class="f">;</span>
<a name="468" /><span class="False">     468:</span>     <span class="f">}</span>
<a name="469" /><span class="False">     469:</span> 
<a name="470" /><span class="False">     470:</span>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span><span class="f">=</span><span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">usable</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="471" /><span class="False">     471:</span>         <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">entry</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">entries</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="472" /><span class="False">     472:</span>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span> <span class="f">=</span> <span class="b">entry</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="473" /><span class="False">     473:</span> 
<a name="474" /><span class="False">     474:</span>         <span class="m">if</span> <span class="f">(</span><span class="b">key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="475" /><span class="False">     475:</span>             <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="476" /><span class="False">     476:</span>                 <span class="b">Py_hash_t</span> <span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span><span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">;</span>
<a name="477" /><span class="False">     477:</span>                 <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">hash</span> <span class="f">!=</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="478" /><span class="False">     478:</span>                 <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">entry</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">==</span> <span class="b">hash</span><span class="f">)</span><span class="f">;</span>
<a name="479" /><span class="False">     479:</span>             <span class="f">}</span>
<a name="480" /><span class="False">     480:</span>             <span class="m">else</span> <span class="f">{</span>
<a name="481" /><span class="False">     481:</span>                 <span class="k">/* test_dict fails if PyObject_Hash() is called again */</span>
<a name="482" /><span class="False">     482:</span>                 <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">entry</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">!=</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="483" /><span class="False">     483:</span>             <span class="f">}</span>
<a name="484" /><span class="False">     484:</span>             <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">splitted</span><span class="f">)</span> <span class="f">{</span>
<a name="485" /><span class="False">     485:</span>                 <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">entry</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="486" /><span class="False">     486:</span>             <span class="f">}</span>
<a name="487" /><span class="False">     487:</span>         <span class="f">}</span>
<a name="488" /><span class="False">     488:</span> 
<a name="489" /><span class="False">     489:</span>         <span class="m">if</span> <span class="f">(</span><span class="b">splitted</span><span class="f">)</span> <span class="f">{</span>
<a name="490" /><span class="False">     490:</span>             <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">entry</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="491" /><span class="False">     491:</span>         <span class="f">}</span>
<a name="492" /><span class="False">     492:</span>     <span class="f">}</span>
<a name="493" /><span class="False">     493:</span> 
<a name="494" /><span class="False">     494:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">splitted</span><span class="f">)</span> <span class="f">{</span>
<a name="495" /><span class="False">     495:</span>         <span class="k">/* splitted table */</span>
<a name="496" /><span class="False">     496:</span>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span><span class="f">=</span><span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="497" /><span class="False">     497:</span>             <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="498" /><span class="False">     498:</span>         <span class="f">}</span>
<a name="499" /><span class="False">     499:</span>     <span class="f">}</span>
<a name="500" /><span class="True">     500:</span> <span class="f">#</span><span class="n">endif</span>
<a name="501" /><span class="True">     501:</span> 
<a name="502" /><a href="dictobject.c.html#502"><span class="True">     502:</span></a>     <span class="m">return</span> <span class="c">1</span><span class="f">;</span>
<a name="503" /><a href="dictobject.c.html#503"><span class="True">     503:</span></a> <span class="f">}</span>
<a name="504" /><span class="True">     504:</span> <span class="f">#</span><span class="n">endif</span>
<a name="505" /><span class="True">     505:</span> 
<a name="506" /><span class="True">     506:</span> 
<a name="507" /><a href="dictobject.c.html#507"><span class="True">     507:</span></a> <span class="m">static</span> <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">new_keys_object</span><span class="f">(</span><span class="b">Py_ssize_t</span> <span class="b">size</span><span class="f">)</span>
<a name="508" /><a href="dictobject.c.html#508"><span class="True">     508:</span></a> <span class="f">{</span>
<a name="509" /><a href="dictobject.c.html#509"><span class="True">     509:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">dk</span><span class="f">;</span>
<a name="510" /><a href="dictobject.c.html#510"><span class="True">     510:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">es</span><span class="f">,</span> <span class="b">usable</span><span class="f">;</span>
<a name="511" /><span class="True">     511:</span> 
<a name="512" /><a href="dictobject.c.html#512"><span class="True">     512:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">size</span> <span class="f">&gt;=</span> <a href="macros_ref.html#_UHlEaWN0X01JTlNJWkVfMA__"><span class="b">PyDict_MINSIZE</span></a><span class="f">)</span><span class="f">;</span>
<a name="513" /><a href="dictobject.c.html#513"><span class="True">     513:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_SVNfUE9XRVJfT0ZfMl8w"><span class="b">IS_POWER_OF_2</span></a><span class="f">(</span><span class="b">size</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="514" /><span class="True">     514:</span> 
<a name="515" /><a href="dictobject.c.html#515"><span class="True">     515:</span></a>     <span class="b">usable</span> <span class="f">=</span> <a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="516" /><a href="dictobject.c.html#516"><span class="True">     516:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">size</span> <span class="f">&lt;=</span> <span class="c">0xff</span><span class="f">)</span> <span class="f">{</span>
<a name="517" /><a href="dictobject.c.html#517"><span class="True">     517:</span></a>         <span class="b">es</span> <span class="f">=</span> <span class="c">1</span><span class="f">;</span>
<a name="518" /><a href="dictobject.c.html#518"><span class="True">     518:</span></a>     <span class="f">}</span>
<a name="519" /><a href="dictobject.c.html#519"><span class="True">     519:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">size</span> <span class="f">&lt;=</span> <span class="c">0xffff</span><span class="f">)</span> <span class="f">{</span>
<a name="520" /><a href="dictobject.c.html#520"><span class="True">     520:</span></a>         <span class="b">es</span> <span class="f">=</span> <span class="c">2</span><span class="f">;</span>
<a name="521" /><a href="dictobject.c.html#521"><span class="True">     521:</span></a>     <span class="f">}</span>
<a name="522" /><span class="True">     522:</span> <span class="f">#</span><span class="n">if</span> <a href="macros_ref.html#_U0laRU9GX1ZPSURfUF8w"><span class="b">SIZEOF_VOID_P</span></a> <span class="f">&gt;</span> <span class="c">4</span>
<a name="523" /><a href="dictobject.c.html#523"><span class="True">     523:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">size</span> <span class="f">&lt;=</span> <span class="c">0xffffffff</span><span class="f">)</span> <span class="f">{</span>
<a name="524" /><a href="dictobject.c.html#524"><span class="True">     524:</span></a>         <span class="b">es</span> <span class="f">=</span> <span class="c">4</span><span class="f">;</span>
<a name="525" /><a href="dictobject.c.html#525"><span class="True">     525:</span></a>     <span class="f">}</span>
<a name="526" /><span class="True">     526:</span> <span class="f">#</span><span class="n">endif</span>
<a name="527" /><a href="dictobject.c.html#527"><span class="True">     527:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="528" /><a href="dictobject.c.html#528"><span class="True">     528:</span></a>         <span class="b">es</span> <span class="f">=</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">Py_ssize_t</span><span class="f">)</span><span class="f">;</span>
<a name="529" /><a href="dictobject.c.html#529"><span class="True">     529:</span></a>     <span class="f">}</span>
<a name="530" /><span class="True">     530:</span> 
<a name="531" /><a href="dictobject.c.html#531"><span class="True">     531:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">size</span> <span class="f">==</span> <a href="macros_ref.html#_UHlEaWN0X01JTlNJWkVfMA__"><span class="b">PyDict_MINSIZE</span></a> <span class="f">&amp;&amp;</span> <span class="b">numfreekeys</span> <span class="f">&gt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="532" /><a href="dictobject.c.html#532"><span class="True">     532:</span></a>         <span class="b">dk</span> <span class="f">=</span> <span class="b">keys_free_list</span><span class="f">[</span><span class="f">--</span><span class="b">numfreekeys</span><span class="f">]</span><span class="f">;</span>
<a name="533" /><a href="dictobject.c.html#533"><span class="True">     533:</span></a>     <span class="f">}</span>
<a name="534" /><a href="dictobject.c.html#534"><span class="True">     534:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="535" /><a href="dictobject.c.html#535"><span class="True">     535:</span></a>         <span class="b">dk</span> <span class="f">=</span> <a href="macros_ref.html#_UHlPYmplY3RfTUFMTE9DXzA_"><span class="b">PyObject_MALLOC</span></a><span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeysObject</span><span class="f">)</span>
<a name="536" /><a href="dictobject.c.html#536"><span class="True">     536:</span></a>                              <span class="f">-</span> <a href="macros_ref.html#_UHlfTUVNQkVSX1NJWkVfMA__"><span class="b">Py_MEMBER_SIZE</span></a><span class="f">(</span><span class="b">PyDictKeysObject</span><span class="f">,</span> <span class="b">dk_indices</span><span class="f">)</span>
<a name="537" /><a href="dictobject.c.html#537"><span class="True">     537:</span></a>                              <span class="f">+</span> <span class="b">es</span> <span class="f">*</span> <span class="b">size</span>
<a name="538" /><a href="dictobject.c.html#538"><span class="True">     538:</span></a>                              <span class="f">+</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeyEntry</span><span class="f">)</span> <span class="f">*</span> <span class="b">usable</span><span class="f">)</span><span class="f">;</span>
<a name="539" /><a href="dictobject.c.html#539"><span class="True">     539:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">dk</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="540" /><a href="dictobject.c.html#540"><span class="True">     540:</span></a>             <span class="b">PyErr_NoMemory</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="541" /><a href="dictobject.c.html#541"><span class="True">     541:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="542" /><a href="dictobject.c.html#542"><span class="True">     542:</span></a>         <span class="f">}</span>
<a name="543" /><a href="dictobject.c.html#543"><span class="True">     543:</span></a>     <span class="f">}</span>
<a name="544" /><a href="dictobject.c.html#544"><span class="True">     544:</span></a>     <a href="macros_ref.html#_REtfREVCVUdfSU5DUkVGXzA_"><span class="b">DK_DEBUG_INCREF</span></a> <span class="b">dk</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span> <span class="f">=</span> <span class="c">1</span><span class="f">;</span>
<a name="545" /><a href="dictobject.c.html#545"><span class="True">     545:</span></a>     <span class="b">dk</span><span class="f">-&gt;</span><span class="b">dk_size</span> <span class="f">=</span> <span class="b">size</span><span class="f">;</span>
<a name="546" /><a href="dictobject.c.html#546"><span class="True">     546:</span></a>     <span class="b">dk</span><span class="f">-&gt;</span><span class="b">dk_usable</span> <span class="f">=</span> <span class="b">usable</span><span class="f">;</span>
<a name="547" /><a href="dictobject.c.html#547"><span class="True">     547:</span></a>     <span class="b">dk</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">=</span> <span class="b">lookdict_unicode_nodummy</span><span class="f">;</span>
<a name="548" /><a href="dictobject.c.html#548"><span class="True">     548:</span></a>     <span class="b">dk</span><span class="f">-&gt;</span><span class="b">dk_nentries</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="549" /><a href="dictobject.c.html#549"><span class="True">     549:</span></a>     <a href="macros_ref.html#_bWVtc2V0XzA_"><span class="b">memset</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">dk</span><span class="f">-&gt;</span><span class="b">dk_indices</span><span class="f">.</span><span class="b">as_1</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">,</span> <span class="c">0xff</span><span class="f">,</span> <span class="b">es</span> <span class="f">*</span> <span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="550" /><a href="dictobject.c.html#550"><span class="True">     550:</span></a>     <a href="macros_ref.html#_bWVtc2V0XzA_"><span class="b">memset</span></a><span class="f">(</span><a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeyEntry</span><span class="f">)</span> <span class="f">*</span> <span class="b">usable</span><span class="f">)</span><span class="f">;</span>
<a name="551" /><a href="dictobject.c.html#551"><span class="True">     551:</span></a>     <span class="m">return</span> <span class="b">dk</span><span class="f">;</span>
<a name="552" /><a href="dictobject.c.html#552"><span class="True">     552:</span></a> <span class="f">}</span>
<a name="553" /><span class="True">     553:</span> 
<a name="554" /><a href="dictobject.c.html#554"><span class="True">     554:</span></a> <span class="m">static</span> <span class="m">void</span>
<a name="555" /><a href="dictobject.c.html#555"><span class="True">     555:</span></a> <span class="b">free_keys_object</span><span class="f">(</span><span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span><span class="f">)</span>
<a name="556" /><a href="dictobject.c.html#556"><span class="True">     556:</span></a> <span class="f">{</span>
<a name="557" /><a href="dictobject.c.html#557"><span class="True">     557:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">entries</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="558" /><a href="dictobject.c.html#558"><span class="True">     558:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="559" /><a href="dictobject.c.html#559"><span class="True">     559:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span> <span class="b">n</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="560" /><a href="dictobject.c.html#560"><span class="True">     560:</span></a>         <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">entries</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_key</span><span class="f">)</span><span class="f">;</span>
<a name="561" /><a href="dictobject.c.html#561"><span class="True">     561:</span></a>         <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">entries</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span><span class="f">)</span><span class="f">;</span>
<a name="562" /><a href="dictobject.c.html#562"><span class="True">     562:</span></a>     <span class="f">}</span>
<a name="563" /><a href="dictobject.c.html#563"><span class="True">     563:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_size</span> <span class="f">==</span> <a href="macros_ref.html#_UHlEaWN0X01JTlNJWkVfMA__"><span class="b">PyDict_MINSIZE</span></a> <span class="f">&amp;&amp;</span> <span class="b">numfreekeys</span> <span class="f">&lt;</span> <a href="macros_ref.html#_UHlEaWN0X01BWEZSRUVMSVNUXzA_"><span class="b">PyDict_MAXFREELIST</span></a><span class="f">)</span> <span class="f">{</span>
<a name="564" /><a href="dictobject.c.html#564"><span class="True">     564:</span></a>         <span class="b">keys_free_list</span><span class="f">[</span><span class="b">numfreekeys</span><span class="f">++</span><span class="f">]</span> <span class="f">=</span> <span class="b">keys</span><span class="f">;</span>
<a name="565" /><a href="dictobject.c.html#565"><span class="True">     565:</span></a>         <span class="m">return</span><span class="f">;</span>
<a name="566" /><a href="dictobject.c.html#566"><span class="True">     566:</span></a>     <span class="f">}</span>
<a name="567" /><a href="dictobject.c.html#567"><span class="True">     567:</span></a>     <a href="macros_ref.html#_UHlPYmplY3RfRlJFRV8w"><span class="b">PyObject_FREE</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="568" /><a href="dictobject.c.html#568"><span class="True">     568:</span></a> <span class="f">}</span>
<a name="569" /><span class="True">     569:</span> 
<a name="570" /><span class="True">     570:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_bmV3X3ZhbHVlc18w"><span class="b">new_values</span></a><span class="f">(</span><span class="b">size</span><span class="f">)</span> <a href="macros_ref.html#_UHlNZW1fTkVXXzA_"><span class="b">PyMem_NEW</span></a><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">,</span> <span class="b">size</span><span class="f">)</span>
<a name="571" /><span class="True">     571:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_ZnJlZV92YWx1ZXNfMA__"><span class="b">free_values</span></a><span class="f">(</span><span class="b">values</span><span class="f">)</span> <a href="macros_ref.html#_UHlNZW1fRlJFRV8w"><span class="b">PyMem_FREE</span></a><span class="f">(</span><span class="b">values</span><span class="f">)</span>
<a name="572" /><span class="True">     572:</span> 
<a name="573" /><span class="True">     573:</span> <span class="k">/* Consumes a reference to the keys object */</span>
<a name="574" /><a href="dictobject.c.html#574"><span class="True">     574:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="575" /><a href="dictobject.c.html#575"><span class="True">     575:</span></a> <span class="b">new_dict</span><span class="f">(</span><span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">values</span><span class="f">)</span>
<a name="576" /><a href="dictobject.c.html#576"><span class="True">     576:</span></a> <span class="f">{</span>
<a name="577" /><a href="dictobject.c.html#577"><span class="True">     577:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="578" /><a href="dictobject.c.html#578"><span class="True">     578:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">keys</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="579" /><a href="dictobject.c.html#579"><span class="True">     579:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">numfree</span><span class="f">)</span> <span class="f">{</span>
<a name="580" /><a href="dictobject.c.html#580"><span class="True">     580:</span></a>         <span class="b">mp</span> <span class="f">=</span> <span class="b">free_list</span><span class="f">[</span><span class="f">--</span><span class="b">numfree</span><span class="f">]</span><span class="f">;</span>
<a name="581" /><a href="dictobject.c.html#581"><span class="True">     581:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a> <span class="f">(</span><span class="b">mp</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="582" /><a href="dictobject.c.html#582"><span class="True">     582:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a> <span class="f">(</span><a href="macros_ref.html#_UHlfVFlQRV8w"><span class="b">Py_TYPE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">==</span> <span class="f">&amp;</span><span class="b">PyDict_Type</span><span class="f">)</span><span class="f">;</span>
<a name="583" /><a href="dictobject.c.html#583"><span class="True">     583:</span></a>         <span class="b">_Py_NewReference</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="584" /><a href="dictobject.c.html#584"><span class="True">     584:</span></a>     <span class="f">}</span>
<a name="585" /><a href="dictobject.c.html#585"><span class="True">     585:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="586" /><a href="dictobject.c.html#586"><span class="True">     586:</span></a>         <span class="b">mp</span> <span class="f">=</span> <a href="macros_ref.html#_UHlPYmplY3RfR0NfTmV3XzA_"><span class="b">PyObject_GC_New</span></a><span class="f">(</span><span class="b">PyDictObject</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyDict_Type</span><span class="f">)</span><span class="f">;</span>
<a name="587" /><a href="dictobject.c.html#587"><span class="True">     587:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">mp</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="588" /><a href="dictobject.c.html#588"><span class="True">     588:</span></a>             <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="589" /><a href="dictobject.c.html#589"><span class="True">     589:</span></a>             <a href="macros_ref.html#_ZnJlZV92YWx1ZXNfMA__"><span class="b">free_values</span></a><span class="f">(</span><span class="b">values</span><span class="f">)</span><span class="f">;</span>
<a name="590" /><a href="dictobject.c.html#590"><span class="True">     590:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="591" /><a href="dictobject.c.html#591"><span class="True">     591:</span></a>         <span class="f">}</span>
<a name="592" /><a href="dictobject.c.html#592"><span class="True">     592:</span></a>     <span class="f">}</span>
<a name="593" /><a href="dictobject.c.html#593"><span class="True">     593:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">=</span> <span class="b">keys</span><span class="f">;</span>
<a name="594" /><a href="dictobject.c.html#594"><span class="True">     594:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">=</span> <span class="b">values</span><span class="f">;</span>
<a name="595" /><a href="dictobject.c.html#595"><span class="True">     595:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="596" /><a href="dictobject.c.html#596"><span class="True">     596:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="597" /><a href="dictobject.c.html#597"><span class="True">     597:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="598" /><a href="dictobject.c.html#598"><span class="True">     598:</span></a>     <span class="m">return</span> <span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">;</span>
<a name="599" /><a href="dictobject.c.html#599"><span class="True">     599:</span></a> <span class="f">}</span>
<a name="600" /><span class="True">     600:</span> 
<a name="601" /><span class="True">     601:</span> <span class="k">/* Consumes a reference to the keys object */</span>
<a name="602" /><a href="dictobject.c.html#602"><span class="True">     602:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="603" /><a href="dictobject.c.html#603"><span class="True">     603:</span></a> <span class="b">new_dict_with_shared_keys</span><span class="f">(</span><span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span><span class="f">)</span>
<a name="604" /><a href="dictobject.c.html#604"><span class="True">     604:</span></a> <span class="f">{</span>
<a name="605" /><a href="dictobject.c.html#605"><span class="True">     605:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">values</span><span class="f">;</span>
<a name="606" /><a href="dictobject.c.html#606"><span class="True">     606:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">size</span><span class="f">;</span>
<a name="607" /><span class="True">     607:</span> 
<a name="608" /><a href="dictobject.c.html#608"><span class="True">     608:</span></a>     <span class="b">size</span> <span class="f">=</span> <a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="609" /><a href="dictobject.c.html#609"><span class="True">     609:</span></a>     <span class="b">values</span> <span class="f">=</span> <a href="macros_ref.html#_bmV3X3ZhbHVlc18w"><span class="b">new_values</span></a><span class="f">(</span><span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="610" /><a href="dictobject.c.html#610"><span class="True">     610:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">values</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="611" /><a href="dictobject.c.html#611"><span class="True">     611:</span></a>         <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="612" /><a href="dictobject.c.html#612"><span class="True">     612:</span></a>         <span class="m">return</span> <span class="b">PyErr_NoMemory</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="613" /><a href="dictobject.c.html#613"><span class="True">     613:</span></a>     <span class="f">}</span>
<a name="614" /><a href="dictobject.c.html#614"><span class="True">     614:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">size</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="615" /><a href="dictobject.c.html#615"><span class="True">     615:</span></a>         <span class="b">values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="616" /><a href="dictobject.c.html#616"><span class="True">     616:</span></a>     <span class="f">}</span>
<a name="617" /><a href="dictobject.c.html#617"><span class="True">     617:</span></a>     <span class="m">return</span> <span class="b">new_dict</span><span class="f">(</span><span class="b">keys</span><span class="f">,</span> <span class="b">values</span><span class="f">)</span><span class="f">;</span>
<a name="618" /><a href="dictobject.c.html#618"><span class="True">     618:</span></a> <span class="f">}</span>
<a name="619" /><span class="True">     619:</span> 
<a name="620" /><a href="dictobject.c.html#620"><span class="True">     620:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="621" /><a href="dictobject.c.html#621"><span class="True">     621:</span></a> <span class="b">PyDict_New</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="622" /><a href="dictobject.c.html#622"><span class="True">     622:</span></a> <span class="f">{</span>
<a name="623" /><a href="dictobject.c.html#623"><span class="True">     623:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span> <span class="f">=</span> <span class="b">new_keys_object</span><span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X01JTlNJWkVfMA__"><span class="b">PyDict_MINSIZE</span></a><span class="f">)</span><span class="f">;</span>
<a name="624" /><a href="dictobject.c.html#624"><span class="True">     624:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">keys</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="625" /><a href="dictobject.c.html#625"><span class="True">     625:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="626" /><a href="dictobject.c.html#626"><span class="True">     626:</span></a>     <span class="m">return</span> <span class="b">new_dict</span><span class="f">(</span><span class="b">keys</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="627" /><a href="dictobject.c.html#627"><span class="True">     627:</span></a> <span class="f">}</span>
<a name="628" /><span class="True">     628:</span> 
<a name="629" /><span class="True">     629:</span> <span class="k">/* Search index of hash table from offset of entry table */</span>
<a name="630" /><a href="dictobject.c.html#630"><span class="True">     630:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span>
<a name="631" /><a href="dictobject.c.html#631"><span class="True">     631:</span></a> <span class="b">lookdict_index</span><span class="f">(</span><span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">k</span><span class="f">,</span> <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="b">index</span><span class="f">)</span>
<a name="632" /><a href="dictobject.c.html#632"><span class="True">     632:</span></a> <span class="f">{</span>
<a name="633" /><a href="dictobject.c.html#633"><span class="True">     633:</span></a>     <span class="b">size_t</span> <span class="b">i</span><span class="f">;</span>
<a name="634" /><a href="dictobject.c.html#634"><span class="True">     634:</span></a>     <span class="b">size_t</span> <span class="b">mask</span> <span class="f">=</span> <a href="macros_ref.html#_REtfTUFTS18w"><span class="b">DK_MASK</span></a><span class="f">(</span><span class="b">k</span><span class="f">)</span><span class="f">;</span>
<a name="635" /><a href="dictobject.c.html#635"><span class="True">     635:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="636" /><span class="True">     636:</span> 
<a name="637" /><a href="dictobject.c.html#637"><span class="True">     637:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="f">(</span><span class="b">size_t</span><span class="f">)</span><span class="b">hash</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">;</span>
<a name="638" /><a href="dictobject.c.html#638"><span class="True">     638:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">k</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="639" /><a href="dictobject.c.html#639"><span class="True">     639:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <span class="b">index</span><span class="f">)</span> <span class="f">{</span>
<a name="640" /><a href="dictobject.c.html#640"><span class="True">     640:</span></a>         <span class="m">return</span> <span class="b">i</span><span class="f">;</span>
<a name="641" /><a href="dictobject.c.html#641"><span class="True">     641:</span></a>     <span class="f">}</span>
<a name="642" /><a href="dictobject.c.html#642"><span class="True">     642:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="643" /><a href="dictobject.c.html#643"><span class="True">     643:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="644" /><a href="dictobject.c.html#644"><span class="True">     644:</span></a>     <span class="f">}</span>
<a name="645" /><span class="True">     645:</span> 
<a name="646" /><a href="dictobject.c.html#646"><span class="True">     646:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">size_t</span> <span class="b">perturb</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span><span class="f">;</span><span class="f">)</span> <span class="f">{</span>
<a name="647" /><a href="dictobject.c.html#647"><span class="True">     647:</span></a>         <span class="b">perturb</span> <span class="f">&gt;&gt;=</span> <a href="macros_ref.html#_UEVSVFVSQl9TSElGVF8w"><span class="b">PERTURB_SHIFT</span></a><span class="f">;</span>
<a name="648" /><a href="dictobject.c.html#648"><span class="True">     648:</span></a>         <span class="b">i</span> <span class="f">=</span> <span class="b">mask</span> <span class="f">&amp;</span> <span class="f">(</span><span class="f">(</span><span class="b">i</span> <span class="f">&lt;&lt;</span> <span class="c">2</span><span class="f">)</span> <span class="f">+</span> <span class="b">i</span> <span class="f">+</span> <span class="b">perturb</span> <span class="f">+</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="649" /><a href="dictobject.c.html#649"><span class="True">     649:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">k</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="650" /><a href="dictobject.c.html#650"><span class="True">     650:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <span class="b">index</span><span class="f">)</span> <span class="f">{</span>
<a name="651" /><a href="dictobject.c.html#651"><span class="True">     651:</span></a>             <span class="m">return</span> <span class="b">i</span><span class="f">;</span>
<a name="652" /><a href="dictobject.c.html#652"><span class="True">     652:</span></a>         <span class="f">}</span>
<a name="653" /><a href="dictobject.c.html#653"><span class="True">     653:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="654" /><a href="dictobject.c.html#654"><span class="True">     654:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="655" /><a href="dictobject.c.html#655"><span class="True">     655:</span></a>         <span class="f">}</span>
<a name="656" /><a href="dictobject.c.html#656"><span class="True">     656:</span></a>     <span class="f">}</span>
<a name="657" /><a href="dictobject.c.html#657"><span class="True">     657:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">;</span>          <span class="k">/* NOT REACHED */</span>
<a name="658" /><a href="dictobject.c.html#658"><span class="True">     658:</span></a>     <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">;</span>
<a name="659" /><a href="dictobject.c.html#659"><span class="True">     659:</span></a> <span class="f">}</span>
<a name="660" /><span class="True">     660:</span> 
<a name="661" /><span class="True">     661:</span> <span class="k">/*</span>
<a name="662" /><span class="True">     662:</span> <span class="k">The basic lookup function used by all operations.</span>
<a name="663" /><span class="True">     663:</span> <span class="k">This is based on Algorithm D from Knuth Vol. 3, Sec. 6.4.</span>
<a name="664" /><span class="True">     664:</span> <span class="k">Open addressing is preferred over chaining since the link overhead for</span>
<a name="665" /><span class="True">     665:</span> <span class="k">chaining would be substantial (100% with typical malloc overhead).</span>
<a name="666" /><span class="True">     666:</span> <span class="k"></span>
<a name="667" /><span class="True">     667:</span> <span class="k">The initial probe index is computed as hash mod the table size. Subsequent</span>
<a name="668" /><span class="True">     668:</span> <span class="k">probe indices are computed as explained earlier.</span>
<a name="669" /><span class="True">     669:</span> <span class="k"></span>
<a name="670" /><span class="True">     670:</span> <span class="k">All arithmetic on hash should ignore overflow.</span>
<a name="671" /><span class="True">     671:</span> <span class="k"></span>
<a name="672" /><span class="True">     672:</span> <span class="k">The details in this version are due to Tim Peters, building on many past</span>
<a name="673" /><span class="True">     673:</span> <span class="k">contributions by Reimer Behrends, Jyrki Alakuijala, Vladimir Marangozov and</span>
<a name="674" /><span class="True">     674:</span> <span class="k">Christian Tismer.</span>
<a name="675" /><span class="True">     675:</span> <span class="k"></span>
<a name="676" /><span class="True">     676:</span> <span class="k">lookdict() is general-purpose, and may return DKIX_ERROR if (and only if) a</span>
<a name="677" /><span class="True">     677:</span> <span class="k">comparison raises an exception.</span>
<a name="678" /><span class="True">     678:</span> <span class="k">lookdict_unicode() below is specialized to string keys, comparison of which can</span>
<a name="679" /><span class="True">     679:</span> <span class="k">never raise an exception; that function can never return DKIX_ERROR when key</span>
<a name="680" /><span class="True">     680:</span> <span class="k">is string.  Otherwise, it falls back to lookdict().</span>
<a name="681" /><span class="True">     681:</span> <span class="k">lookdict_unicode_nodummy is further specialized for string keys that cannot be</span>
<a name="682" /><span class="True">     682:</span> <span class="k">the &lt;dummy&gt; value.</span>
<a name="683" /><span class="True">     683:</span> <span class="k">For both, when the key isn&apos;t found a DKIX_EMPTY is returned. hashpos returns</span>
<a name="684" /><span class="True">     684:</span> <span class="k">where the key index should be inserted.</span>
<a name="685" /><span class="True">     685:</span> <span class="k">*/</span>
<a name="686" /><a href="dictobject.c.html#686"><span class="True">     686:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span>
<a name="687" /><a href="dictobject.c.html#687"><span class="True">     687:</span></a> <span class="b">lookdict</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span>
<a name="688" /><a href="dictobject.c.html#688"><span class="True">     688:</span></a>          <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">hashpos</span><span class="f">)</span>
<a name="689" /><a href="dictobject.c.html#689"><span class="True">     689:</span></a> <span class="f">{</span>
<a name="690" /><a href="dictobject.c.html#690"><span class="True">     690:</span></a>     <span class="b">size_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">mask</span><span class="f">;</span>
<a name="691" /><a href="dictobject.c.html#691"><span class="True">     691:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">,</span> <span class="b">freeslot</span><span class="f">;</span>
<a name="692" /><a href="dictobject.c.html#692"><span class="True">     692:</span></a>     <span class="m">int</span> <span class="b">cmp</span><span class="f">;</span>
<a name="693" /><a href="dictobject.c.html#693"><span class="True">     693:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">dk</span><span class="f">;</span>
<a name="694" /><a href="dictobject.c.html#694"><span class="True">     694:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep0</span><span class="f">,</span> <span class="f">*</span><span class="b">ep</span><span class="f">;</span>
<a name="695" /><a href="dictobject.c.html#695"><span class="True">     695:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">startkey</span><span class="f">;</span>
<a name="696" /><span class="True">     696:</span> 
<a name="697" /><a href="dictobject.c.html#697"><span class="True">     697:</span></a> <span class="b">top</span><span class="f">:</span>
<a name="698" /><a href="dictobject.c.html#698"><span class="True">     698:</span></a>     <span class="b">dk</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="699" /><a href="dictobject.c.html#699"><span class="True">     699:</span></a>     <span class="b">mask</span> <span class="f">=</span> <a href="macros_ref.html#_REtfTUFTS18w"><span class="b">DK_MASK</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span><span class="f">;</span>
<a name="700" /><a href="dictobject.c.html#700"><span class="True">     700:</span></a>     <span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">dk</span><span class="f">)</span><span class="f">;</span>
<a name="701" /><a href="dictobject.c.html#701"><span class="True">     701:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="f">(</span><span class="b">size_t</span><span class="f">)</span><span class="b">hash</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">;</span>
<a name="702" /><span class="True">     702:</span> 
<a name="703" /><a href="dictobject.c.html#703"><span class="True">     703:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">dk</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="704" /><a href="dictobject.c.html#704"><span class="True">     704:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="705" /><a href="dictobject.c.html#705"><span class="True">     705:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="706" /><a href="dictobject.c.html#706"><span class="True">     706:</span></a>             <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="707" /><a href="dictobject.c.html#707"><span class="True">     707:</span></a>         <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="708" /><a href="dictobject.c.html#708"><span class="True">     708:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="709" /><a href="dictobject.c.html#709"><span class="True">     709:</span></a>     <span class="f">}</span>
<a name="710" /><a href="dictobject.c.html#710"><span class="True">     710:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="711" /><a href="dictobject.c.html#711"><span class="True">     711:</span></a>         <span class="b">freeslot</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="712" /><a href="dictobject.c.html#712"><span class="True">     712:</span></a>     <span class="f">}</span>
<a name="713" /><a href="dictobject.c.html#713"><span class="True">     713:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="714" /><a href="dictobject.c.html#714"><span class="True">     714:</span></a>         <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="715" /><a href="dictobject.c.html#715"><span class="True">     715:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="716" /><a href="dictobject.c.html#716"><span class="True">     716:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">key</span><span class="f">)</span> <span class="f">{</span>
<a name="717" /><a href="dictobject.c.html#717"><span class="True">     717:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="718" /><a href="dictobject.c.html#718"><span class="True">     718:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="719" /><a href="dictobject.c.html#719"><span class="True">     719:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="720" /><a href="dictobject.c.html#720"><span class="True">     720:</span></a>             <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="721" /><a href="dictobject.c.html#721"><span class="True">     721:</span></a>         <span class="f">}</span>
<a name="722" /><a href="dictobject.c.html#722"><span class="True">     722:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">==</span> <span class="b">hash</span><span class="f">)</span> <span class="f">{</span>
<a name="723" /><a href="dictobject.c.html#723"><span class="True">     723:</span></a>             <span class="b">startkey</span> <span class="f">=</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="724" /><a href="dictobject.c.html#724"><span class="True">     724:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">startkey</span><span class="f">)</span><span class="f">;</span>
<a name="725" /><a href="dictobject.c.html#725"><span class="True">     725:</span></a>             <span class="b">cmp</span> <span class="f">=</span> <span class="b">PyObject_RichCompareBool</span><span class="f">(</span><span class="b">startkey</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <a href="macros_ref.html#_UHlfRVFfMA__"><span class="b">Py_EQ</span></a><span class="f">)</span><span class="f">;</span>
<a name="726" /><a href="dictobject.c.html#726"><span class="True">     726:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">startkey</span><span class="f">)</span><span class="f">;</span>
<a name="727" /><a href="dictobject.c.html#727"><span class="True">     727:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">cmp</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="728" /><a href="dictobject.c.html#728"><span class="True">     728:</span></a>                 <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="729" /><a href="dictobject.c.html#729"><span class="True">     729:</span></a>                 <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">;</span>
<a name="730" /><a href="dictobject.c.html#730"><span class="True">     730:</span></a>             <span class="f">}</span>
<a name="731" /><a href="dictobject.c.html#731"><span class="True">     731:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">dk</span> <span class="f">==</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">&amp;&amp;</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">startkey</span><span class="f">)</span> <span class="f">{</span>
<a name="732" /><a href="dictobject.c.html#732"><span class="True">     732:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">cmp</span> <span class="f">&gt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="733" /><a href="dictobject.c.html#733"><span class="True">     733:</span></a>                     <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="734" /><a href="dictobject.c.html#734"><span class="True">     734:</span></a>                     <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="735" /><a href="dictobject.c.html#735"><span class="True">     735:</span></a>                         <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="736" /><a href="dictobject.c.html#736"><span class="True">     736:</span></a>                     <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="737" /><a href="dictobject.c.html#737"><span class="True">     737:</span></a>                 <span class="f">}</span>
<a name="738" /><a href="dictobject.c.html#738"><span class="True">     738:</span></a>             <span class="f">}</span>
<a name="739" /><a href="dictobject.c.html#739"><span class="True">     739:</span></a>             <span class="m">else</span> <span class="f">{</span>
<a name="740" /><span class="True">     740:</span>                 <span class="k">/* The dict was mutated, restart */</span>
<a name="741" /><a href="dictobject.c.html#741"><span class="True">     741:</span></a>                 <span class="m">goto</span> <span class="b">top</span><span class="f">;</span>
<a name="742" /><a href="dictobject.c.html#742"><span class="True">     742:</span></a>             <span class="f">}</span>
<a name="743" /><a href="dictobject.c.html#743"><span class="True">     743:</span></a>         <span class="f">}</span>
<a name="744" /><a href="dictobject.c.html#744"><span class="True">     744:</span></a>         <span class="b">freeslot</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="745" /><a href="dictobject.c.html#745"><span class="True">     745:</span></a>     <span class="f">}</span>
<a name="746" /><span class="True">     746:</span> 
<a name="747" /><a href="dictobject.c.html#747"><span class="True">     747:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">size_t</span> <span class="b">perturb</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span><span class="f">;</span><span class="f">)</span> <span class="f">{</span>
<a name="748" /><a href="dictobject.c.html#748"><span class="True">     748:</span></a>         <span class="b">perturb</span> <span class="f">&gt;&gt;=</span> <a href="macros_ref.html#_UEVSVFVSQl9TSElGVF8w"><span class="b">PERTURB_SHIFT</span></a><span class="f">;</span>
<a name="749" /><a href="dictobject.c.html#749"><span class="True">     749:</span></a>         <span class="b">i</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">i</span> <span class="f">&lt;&lt;</span> <span class="c">2</span><span class="f">)</span> <span class="f">+</span> <span class="b">i</span> <span class="f">+</span> <span class="b">perturb</span> <span class="f">+</span> <span class="c">1</span><span class="f">)</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">;</span>
<a name="750" /><a href="dictobject.c.html#750"><span class="True">     750:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">dk</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="751" /><a href="dictobject.c.html#751"><span class="True">     751:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="752" /><a href="dictobject.c.html#752"><span class="True">     752:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="753" /><a href="dictobject.c.html#753"><span class="True">     753:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="f">(</span><span class="b">freeslot</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">?</span> <span class="f">(</span><span class="b">Py_ssize_t</span><span class="f">)</span><span class="b">i</span> <span class="f">:</span> <span class="b">freeslot</span><span class="f">;</span>
<a name="754" /><a href="dictobject.c.html#754"><span class="True">     754:</span></a>             <span class="f">}</span>
<a name="755" /><a href="dictobject.c.html#755"><span class="True">     755:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="756" /><a href="dictobject.c.html#756"><span class="True">     756:</span></a>             <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="757" /><a href="dictobject.c.html#757"><span class="True">     757:</span></a>         <span class="f">}</span>
<a name="758" /><a href="dictobject.c.html#758"><span class="True">     758:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="759" /><a href="dictobject.c.html#759"><span class="True">     759:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">freeslot</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="760" /><a href="dictobject.c.html#760"><span class="True">     760:</span></a>                 <span class="b">freeslot</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="761" /><a href="dictobject.c.html#761"><span class="True">     761:</span></a>             <span class="m">continue</span><span class="f">;</span>
<a name="762" /><a href="dictobject.c.html#762"><span class="True">     762:</span></a>         <span class="f">}</span>
<a name="763" /><a href="dictobject.c.html#763"><span class="True">     763:</span></a>         <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="764" /><a href="dictobject.c.html#764"><span class="True">     764:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="765" /><a href="dictobject.c.html#765"><span class="True">     765:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">key</span><span class="f">)</span> <span class="f">{</span>
<a name="766" /><a href="dictobject.c.html#766"><span class="True">     766:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="767" /><a href="dictobject.c.html#767"><span class="True">     767:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="768" /><a href="dictobject.c.html#768"><span class="True">     768:</span></a>             <span class="f">}</span>
<a name="769" /><a href="dictobject.c.html#769"><span class="True">     769:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="770" /><a href="dictobject.c.html#770"><span class="True">     770:</span></a>             <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="771" /><a href="dictobject.c.html#771"><span class="True">     771:</span></a>         <span class="f">}</span>
<a name="772" /><a href="dictobject.c.html#772"><span class="True">     772:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">==</span> <span class="b">hash</span><span class="f">)</span> <span class="f">{</span>
<a name="773" /><a href="dictobject.c.html#773"><span class="True">     773:</span></a>             <span class="b">startkey</span> <span class="f">=</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="774" /><a href="dictobject.c.html#774"><span class="True">     774:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">startkey</span><span class="f">)</span><span class="f">;</span>
<a name="775" /><a href="dictobject.c.html#775"><span class="True">     775:</span></a>             <span class="b">cmp</span> <span class="f">=</span> <span class="b">PyObject_RichCompareBool</span><span class="f">(</span><span class="b">startkey</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <a href="macros_ref.html#_UHlfRVFfMA__"><span class="b">Py_EQ</span></a><span class="f">)</span><span class="f">;</span>
<a name="776" /><a href="dictobject.c.html#776"><span class="True">     776:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">startkey</span><span class="f">)</span><span class="f">;</span>
<a name="777" /><a href="dictobject.c.html#777"><span class="True">     777:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">cmp</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="778" /><a href="dictobject.c.html#778"><span class="True">     778:</span></a>                 <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="779" /><a href="dictobject.c.html#779"><span class="True">     779:</span></a>                 <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">;</span>
<a name="780" /><a href="dictobject.c.html#780"><span class="True">     780:</span></a>             <span class="f">}</span>
<a name="781" /><a href="dictobject.c.html#781"><span class="True">     781:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">dk</span> <span class="f">==</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">&amp;&amp;</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">startkey</span><span class="f">)</span> <span class="f">{</span>
<a name="782" /><a href="dictobject.c.html#782"><span class="True">     782:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">cmp</span> <span class="f">&gt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="783" /><a href="dictobject.c.html#783"><span class="True">     783:</span></a>                     <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="784" /><a href="dictobject.c.html#784"><span class="True">     784:</span></a>                         <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="785" /><a href="dictobject.c.html#785"><span class="True">     785:</span></a>                     <span class="f">}</span>
<a name="786" /><a href="dictobject.c.html#786"><span class="True">     786:</span></a>                     <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="787" /><a href="dictobject.c.html#787"><span class="True">     787:</span></a>                     <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="788" /><a href="dictobject.c.html#788"><span class="True">     788:</span></a>                 <span class="f">}</span>
<a name="789" /><a href="dictobject.c.html#789"><span class="True">     789:</span></a>             <span class="f">}</span>
<a name="790" /><a href="dictobject.c.html#790"><span class="True">     790:</span></a>             <span class="m">else</span> <span class="f">{</span>
<a name="791" /><span class="True">     791:</span>                 <span class="k">/* The dict was mutated, restart */</span>
<a name="792" /><a href="dictobject.c.html#792"><span class="True">     792:</span></a>                 <span class="m">goto</span> <span class="b">top</span><span class="f">;</span>
<a name="793" /><a href="dictobject.c.html#793"><span class="True">     793:</span></a>             <span class="f">}</span>
<a name="794" /><a href="dictobject.c.html#794"><span class="True">     794:</span></a>         <span class="f">}</span>
<a name="795" /><a href="dictobject.c.html#795"><span class="True">     795:</span></a>     <span class="f">}</span>
<a name="796" /><a href="dictobject.c.html#796"><span class="True">     796:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">;</span>          <span class="k">/* NOT REACHED */</span>
<a name="797" /><a href="dictobject.c.html#797"><span class="True">     797:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="798" /><a href="dictobject.c.html#798"><span class="True">     798:</span></a> <span class="f">}</span>
<a name="799" /><span class="True">     799:</span> 
<a name="800" /><span class="True">     800:</span> <span class="k">/* Specialized version for string-only keys */</span>
<a name="801" /><a href="dictobject.c.html#801"><span class="True">     801:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span>
<a name="802" /><a href="dictobject.c.html#802"><span class="True">     802:</span></a> <span class="b">lookdict_unicode</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span>
<a name="803" /><a href="dictobject.c.html#803"><span class="True">     803:</span></a>                  <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">hashpos</span><span class="f">)</span>
<a name="804" /><a href="dictobject.c.html#804"><span class="True">     804:</span></a> <span class="f">{</span>
<a name="805" /><a href="dictobject.c.html#805"><span class="True">     805:</span></a>     <span class="b">size_t</span> <span class="b">i</span><span class="f">;</span>
<a name="806" /><a href="dictobject.c.html#806"><span class="True">     806:</span></a>     <span class="b">size_t</span> <span class="b">mask</span> <span class="f">=</span> <a href="macros_ref.html#_REtfTUFTS18w"><span class="b">DK_MASK</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="807" /><a href="dictobject.c.html#807"><span class="True">     807:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">,</span> <span class="b">freeslot</span><span class="f">;</span>
<a name="808" /><a href="dictobject.c.html#808"><span class="True">     808:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">,</span> <span class="f">*</span><span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="809" /><span class="True">     809:</span> 
<a name="810" /><a href="dictobject.c.html#810"><span class="True">     810:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="811" /><span class="True">     811:</span>     <span class="k">/* Make sure this function doesn&apos;t have to handle non-unicode keys,</span>
<a name="812" /><span class="True">     812:</span> <span class="k">       including subclasses of str; e.g., one reason to subclass</span>
<a name="813" /><span class="True">     813:</span> <span class="k">       unicodes is to override __eq__, and for speed we don&apos;t cater to</span>
<a name="814" /><span class="True">     814:</span> <span class="k">       that here. */</span>
<a name="815" /><a href="dictobject.c.html#815"><span class="True">     815:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="816" /><a href="dictobject.c.html#816"><span class="True">     816:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">=</span> <span class="b">lookdict</span><span class="f">;</span>
<a name="817" /><a href="dictobject.c.html#817"><span class="True">     817:</span></a>         <span class="m">return</span> <span class="b">lookdict</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">value_addr</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="818" /><a href="dictobject.c.html#818"><span class="True">     818:</span></a>     <span class="f">}</span>
<a name="819" /><a href="dictobject.c.html#819"><span class="True">     819:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="f">(</span><span class="b">size_t</span><span class="f">)</span><span class="b">hash</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">;</span>
<a name="820" /><a href="dictobject.c.html#820"><span class="True">     820:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="821" /><a href="dictobject.c.html#821"><span class="True">     821:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="822" /><a href="dictobject.c.html#822"><span class="True">     822:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="823" /><a href="dictobject.c.html#823"><span class="True">     823:</span></a>             <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="824" /><a href="dictobject.c.html#824"><span class="True">     824:</span></a>         <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="825" /><a href="dictobject.c.html#825"><span class="True">     825:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="826" /><a href="dictobject.c.html#826"><span class="True">     826:</span></a>     <span class="f">}</span>
<a name="827" /><a href="dictobject.c.html#827"><span class="True">     827:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="828" /><a href="dictobject.c.html#828"><span class="True">     828:</span></a>         <span class="b">freeslot</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="829" /><a href="dictobject.c.html#829"><span class="True">     829:</span></a>     <span class="f">}</span>
<a name="830" /><a href="dictobject.c.html#830"><span class="True">     830:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="831" /><a href="dictobject.c.html#831"><span class="True">     831:</span></a>         <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="832" /><a href="dictobject.c.html#832"><span class="True">     832:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="833" /><a href="dictobject.c.html#833"><span class="True">     833:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">key</span>
<a name="834" /><a href="dictobject.c.html#834"><span class="True">     834:</span></a>             <span class="f">||</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">==</span> <span class="b">hash</span> <span class="f">&amp;&amp;</span> <span class="b">unicode_eq</span><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="835" /><a href="dictobject.c.html#835"><span class="True">     835:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="836" /><a href="dictobject.c.html#836"><span class="True">     836:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="837" /><a href="dictobject.c.html#837"><span class="True">     837:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="838" /><a href="dictobject.c.html#838"><span class="True">     838:</span></a>             <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="839" /><a href="dictobject.c.html#839"><span class="True">     839:</span></a>         <span class="f">}</span>
<a name="840" /><a href="dictobject.c.html#840"><span class="True">     840:</span></a>         <span class="b">freeslot</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="841" /><a href="dictobject.c.html#841"><span class="True">     841:</span></a>     <span class="f">}</span>
<a name="842" /><span class="True">     842:</span> 
<a name="843" /><a href="dictobject.c.html#843"><span class="True">     843:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">size_t</span> <span class="b">perturb</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span><span class="f">;</span><span class="f">)</span> <span class="f">{</span>
<a name="844" /><a href="dictobject.c.html#844"><span class="True">     844:</span></a>         <span class="b">perturb</span> <span class="f">&gt;&gt;=</span> <a href="macros_ref.html#_UEVSVFVSQl9TSElGVF8w"><span class="b">PERTURB_SHIFT</span></a><span class="f">;</span>
<a name="845" /><a href="dictobject.c.html#845"><span class="True">     845:</span></a>         <span class="b">i</span> <span class="f">=</span> <span class="b">mask</span> <span class="f">&amp;</span> <span class="f">(</span><span class="f">(</span><span class="b">i</span> <span class="f">&lt;&lt;</span> <span class="c">2</span><span class="f">)</span> <span class="f">+</span> <span class="b">i</span> <span class="f">+</span> <span class="b">perturb</span> <span class="f">+</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="846" /><a href="dictobject.c.html#846"><span class="True">     846:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="847" /><a href="dictobject.c.html#847"><span class="True">     847:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="848" /><a href="dictobject.c.html#848"><span class="True">     848:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="849" /><a href="dictobject.c.html#849"><span class="True">     849:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="f">(</span><span class="b">freeslot</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">?</span> <span class="f">(</span><span class="b">Py_ssize_t</span><span class="f">)</span><span class="b">i</span> <span class="f">:</span> <span class="b">freeslot</span><span class="f">;</span>
<a name="850" /><a href="dictobject.c.html#850"><span class="True">     850:</span></a>             <span class="f">}</span>
<a name="851" /><a href="dictobject.c.html#851"><span class="True">     851:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="852" /><a href="dictobject.c.html#852"><span class="True">     852:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="853" /><a href="dictobject.c.html#853"><span class="True">     853:</span></a>         <span class="f">}</span>
<a name="854" /><a href="dictobject.c.html#854"><span class="True">     854:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="855" /><a href="dictobject.c.html#855"><span class="True">     855:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">freeslot</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="856" /><a href="dictobject.c.html#856"><span class="True">     856:</span></a>                 <span class="b">freeslot</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="857" /><a href="dictobject.c.html#857"><span class="True">     857:</span></a>             <span class="m">continue</span><span class="f">;</span>
<a name="858" /><a href="dictobject.c.html#858"><span class="True">     858:</span></a>         <span class="f">}</span>
<a name="859" /><a href="dictobject.c.html#859"><span class="True">     859:</span></a>         <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="860" /><a href="dictobject.c.html#860"><span class="True">     860:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="861" /><a href="dictobject.c.html#861"><span class="True">     861:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">key</span>
<a name="862" /><a href="dictobject.c.html#862"><span class="True">     862:</span></a>             <span class="f">||</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">==</span> <span class="b">hash</span> <span class="f">&amp;&amp;</span> <span class="b">unicode_eq</span><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="863" /><a href="dictobject.c.html#863"><span class="True">     863:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="864" /><a href="dictobject.c.html#864"><span class="True">     864:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="865" /><a href="dictobject.c.html#865"><span class="True">     865:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="866" /><a href="dictobject.c.html#866"><span class="True">     866:</span></a>             <span class="f">}</span>
<a name="867" /><a href="dictobject.c.html#867"><span class="True">     867:</span></a>             <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="868" /><a href="dictobject.c.html#868"><span class="True">     868:</span></a>         <span class="f">}</span>
<a name="869" /><a href="dictobject.c.html#869"><span class="True">     869:</span></a>     <span class="f">}</span>
<a name="870" /><a href="dictobject.c.html#870"><span class="True">     870:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">;</span>          <span class="k">/* NOT REACHED */</span>
<a name="871" /><a href="dictobject.c.html#871"><span class="True">     871:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="872" /><a href="dictobject.c.html#872"><span class="True">     872:</span></a> <span class="f">}</span>
<a name="873" /><span class="True">     873:</span> 
<a name="874" /><span class="True">     874:</span> <span class="k">/* Faster version of lookdict_unicode when it is known that no &lt;dummy&gt; keys</span>
<a name="875" /><span class="True">     875:</span> <span class="k"> * will be present. */</span>
<a name="876" /><a href="dictobject.c.html#876"><span class="True">     876:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span>
<a name="877" /><a href="dictobject.c.html#877"><span class="True">     877:</span></a> <span class="b">lookdict_unicode_nodummy</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span>
<a name="878" /><a href="dictobject.c.html#878"><span class="True">     878:</span></a>                          <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">,</span>
<a name="879" /><a href="dictobject.c.html#879"><span class="True">     879:</span></a>                          <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">hashpos</span><span class="f">)</span>
<a name="880" /><a href="dictobject.c.html#880"><span class="True">     880:</span></a> <span class="f">{</span>
<a name="881" /><a href="dictobject.c.html#881"><span class="True">     881:</span></a>     <span class="b">size_t</span> <span class="b">i</span><span class="f">;</span>
<a name="882" /><a href="dictobject.c.html#882"><span class="True">     882:</span></a>     <span class="b">size_t</span> <span class="b">mask</span> <span class="f">=</span> <a href="macros_ref.html#_REtfTUFTS18w"><span class="b">DK_MASK</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="883" /><a href="dictobject.c.html#883"><span class="True">     883:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="884" /><a href="dictobject.c.html#884"><span class="True">     884:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">,</span> <span class="f">*</span><span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="885" /><span class="True">     885:</span> 
<a name="886" /><a href="dictobject.c.html#886"><span class="True">     886:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="887" /><span class="True">     887:</span>     <span class="k">/* Make sure this function doesn&apos;t have to handle non-unicode keys,</span>
<a name="888" /><span class="True">     888:</span> <span class="k">       including subclasses of str; e.g., one reason to subclass</span>
<a name="889" /><span class="True">     889:</span> <span class="k">       unicodes is to override __eq__, and for speed we don&apos;t cater to</span>
<a name="890" /><span class="True">     890:</span> <span class="k">       that here. */</span>
<a name="891" /><a href="dictobject.c.html#891"><span class="True">     891:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="892" /><a href="dictobject.c.html#892"><span class="True">     892:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">=</span> <span class="b">lookdict</span><span class="f">;</span>
<a name="893" /><a href="dictobject.c.html#893"><span class="True">     893:</span></a>         <span class="m">return</span> <span class="b">lookdict</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">value_addr</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="894" /><a href="dictobject.c.html#894"><span class="True">     894:</span></a>     <span class="f">}</span>
<a name="895" /><a href="dictobject.c.html#895"><span class="True">     895:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="f">(</span><span class="b">size_t</span><span class="f">)</span><span class="b">hash</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">;</span>
<a name="896" /><a href="dictobject.c.html#896"><span class="True">     896:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="897" /><a href="dictobject.c.html#897"><span class="True">     897:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a> <span class="f">(</span><span class="b">ix</span> <span class="f">!=</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span><span class="f">;</span>
<a name="898" /><a href="dictobject.c.html#898"><span class="True">     898:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="899" /><a href="dictobject.c.html#899"><span class="True">     899:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="900" /><a href="dictobject.c.html#900"><span class="True">     900:</span></a>             <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="901" /><a href="dictobject.c.html#901"><span class="True">     901:</span></a>         <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="902" /><a href="dictobject.c.html#902"><span class="True">     902:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="903" /><a href="dictobject.c.html#903"><span class="True">     903:</span></a>     <span class="f">}</span>
<a name="904" /><a href="dictobject.c.html#904"><span class="True">     904:</span></a>     <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="905" /><a href="dictobject.c.html#905"><span class="True">     905:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="906" /><a href="dictobject.c.html#906"><span class="True">     906:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="907" /><a href="dictobject.c.html#907"><span class="True">     907:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">key</span> <span class="f">||</span>
<a name="908" /><a href="dictobject.c.html#908"><span class="True">     908:</span></a>         <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">==</span> <span class="b">hash</span> <span class="f">&amp;&amp;</span> <span class="b">unicode_eq</span><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="909" /><a href="dictobject.c.html#909"><span class="True">     909:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="910" /><a href="dictobject.c.html#910"><span class="True">     910:</span></a>             <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="911" /><a href="dictobject.c.html#911"><span class="True">     911:</span></a>         <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="912" /><a href="dictobject.c.html#912"><span class="True">     912:</span></a>         <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="913" /><a href="dictobject.c.html#913"><span class="True">     913:</span></a>     <span class="f">}</span>
<a name="914" /><a href="dictobject.c.html#914"><span class="True">     914:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">size_t</span> <span class="b">perturb</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span><span class="f">;</span><span class="f">)</span> <span class="f">{</span>
<a name="915" /><a href="dictobject.c.html#915"><span class="True">     915:</span></a>         <span class="b">perturb</span> <span class="f">&gt;&gt;=</span> <a href="macros_ref.html#_UEVSVFVSQl9TSElGVF8w"><span class="b">PERTURB_SHIFT</span></a><span class="f">;</span>
<a name="916" /><a href="dictobject.c.html#916"><span class="True">     916:</span></a>         <span class="b">i</span> <span class="f">=</span> <span class="b">mask</span> <span class="f">&amp;</span> <span class="f">(</span><span class="f">(</span><span class="b">i</span> <span class="f">&lt;&lt;</span> <span class="c">2</span><span class="f">)</span> <span class="f">+</span> <span class="b">i</span> <span class="f">+</span> <span class="b">perturb</span> <span class="f">+</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="917" /><a href="dictobject.c.html#917"><span class="True">     917:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="918" /><a href="dictobject.c.html#918"><span class="True">     918:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a> <span class="f">(</span><span class="b">ix</span> <span class="f">!=</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span><span class="f">;</span>
<a name="919" /><a href="dictobject.c.html#919"><span class="True">     919:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="920" /><a href="dictobject.c.html#920"><span class="True">     920:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="921" /><a href="dictobject.c.html#921"><span class="True">     921:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="922" /><a href="dictobject.c.html#922"><span class="True">     922:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="923" /><a href="dictobject.c.html#923"><span class="True">     923:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="924" /><a href="dictobject.c.html#924"><span class="True">     924:</span></a>         <span class="f">}</span>
<a name="925" /><a href="dictobject.c.html#925"><span class="True">     925:</span></a>         <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="926" /><a href="dictobject.c.html#926"><span class="True">     926:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="927" /><a href="dictobject.c.html#927"><span class="True">     927:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">key</span> <span class="f">||</span>
<a name="928" /><a href="dictobject.c.html#928"><span class="True">     928:</span></a>             <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">==</span> <span class="b">hash</span> <span class="f">&amp;&amp;</span> <span class="b">unicode_eq</span><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="929" /><a href="dictobject.c.html#929"><span class="True">     929:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="930" /><a href="dictobject.c.html#930"><span class="True">     930:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="931" /><a href="dictobject.c.html#931"><span class="True">     931:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="932" /><a href="dictobject.c.html#932"><span class="True">     932:</span></a>             <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="933" /><a href="dictobject.c.html#933"><span class="True">     933:</span></a>         <span class="f">}</span>
<a name="934" /><a href="dictobject.c.html#934"><span class="True">     934:</span></a>     <span class="f">}</span>
<a name="935" /><a href="dictobject.c.html#935"><span class="True">     935:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">;</span>          <span class="k">/* NOT REACHED */</span>
<a name="936" /><a href="dictobject.c.html#936"><span class="True">     936:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="937" /><a href="dictobject.c.html#937"><span class="True">     937:</span></a> <span class="f">}</span>
<a name="938" /><span class="True">     938:</span> 
<a name="939" /><span class="True">     939:</span> <span class="k">/* Version of lookdict for split tables.</span>
<a name="940" /><span class="True">     940:</span> <span class="k"> * All split tables and only split tables use this lookup function.</span>
<a name="941" /><span class="True">     941:</span> <span class="k"> * Split tables only contain unicode keys and no dummy keys,</span>
<a name="942" /><span class="True">     942:</span> <span class="k"> * so algorithm is the same as lookdict_unicode_nodummy.</span>
<a name="943" /><span class="True">     943:</span> <span class="k"> */</span>
<a name="944" /><a href="dictobject.c.html#944"><span class="True">     944:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span>
<a name="945" /><a href="dictobject.c.html#945"><span class="True">     945:</span></a> <span class="b">lookdict_split</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span>
<a name="946" /><a href="dictobject.c.html#946"><span class="True">     946:</span></a>                <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">hashpos</span><span class="f">)</span>
<a name="947" /><a href="dictobject.c.html#947"><span class="True">     947:</span></a> <span class="f">{</span>
<a name="948" /><a href="dictobject.c.html#948"><span class="True">     948:</span></a>     <span class="b">size_t</span> <span class="b">i</span><span class="f">;</span>
<a name="949" /><a href="dictobject.c.html#949"><span class="True">     949:</span></a>     <span class="b">size_t</span> <span class="b">mask</span> <span class="f">=</span> <a href="macros_ref.html#_REtfTUFTS18w"><span class="b">DK_MASK</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="950" /><a href="dictobject.c.html#950"><span class="True">     950:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="951" /><a href="dictobject.c.html#951"><span class="True">     951:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">,</span> <span class="f">*</span><span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="952" /><span class="True">     952:</span> 
<a name="953" /><span class="True">     953:</span>     <span class="k">/* mp must split table */</span>
<a name="954" /><a href="dictobject.c.html#954"><span class="True">     954:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="955" /><a href="dictobject.c.html#955"><span class="True">     955:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="956" /><a href="dictobject.c.html#956"><span class="True">     956:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">lookdict</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">value_addr</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="957" /><a href="dictobject.c.html#957"><span class="True">     957:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="958" /><a href="dictobject.c.html#958"><span class="True">     958:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="959" /><a href="dictobject.c.html#959"><span class="True">     959:</span></a>         <span class="f">}</span>
<a name="960" /><a href="dictobject.c.html#960"><span class="True">     960:</span></a>         <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="961" /><a href="dictobject.c.html#961"><span class="True">     961:</span></a>     <span class="f">}</span>
<a name="962" /><span class="True">     962:</span> 
<a name="963" /><a href="dictobject.c.html#963"><span class="True">     963:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="f">(</span><span class="b">size_t</span><span class="f">)</span><span class="b">hash</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">;</span>
<a name="964" /><a href="dictobject.c.html#964"><span class="True">     964:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="965" /><a href="dictobject.c.html#965"><span class="True">     965:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="966" /><a href="dictobject.c.html#966"><span class="True">     966:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="967" /><a href="dictobject.c.html#967"><span class="True">     967:</span></a>             <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="968" /><a href="dictobject.c.html#968"><span class="True">     968:</span></a>         <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="969" /><a href="dictobject.c.html#969"><span class="True">     969:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="970" /><a href="dictobject.c.html#970"><span class="True">     970:</span></a>     <span class="f">}</span>
<a name="971" /><a href="dictobject.c.html#971"><span class="True">     971:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="972" /><a href="dictobject.c.html#972"><span class="True">     972:</span></a>     <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="973" /><a href="dictobject.c.html#973"><span class="True">     973:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="974" /><a href="dictobject.c.html#974"><span class="True">     974:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">key</span> <span class="f">||</span>
<a name="975" /><a href="dictobject.c.html#975"><span class="True">     975:</span></a>         <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">==</span> <span class="b">hash</span> <span class="f">&amp;&amp;</span> <span class="b">unicode_eq</span><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="976" /><a href="dictobject.c.html#976"><span class="True">     976:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="977" /><a href="dictobject.c.html#977"><span class="True">     977:</span></a>             <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="978" /><a href="dictobject.c.html#978"><span class="True">     978:</span></a>         <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="979" /><a href="dictobject.c.html#979"><span class="True">     979:</span></a>         <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="980" /><a href="dictobject.c.html#980"><span class="True">     980:</span></a>     <span class="f">}</span>
<a name="981" /><a href="dictobject.c.html#981"><span class="True">     981:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">size_t</span> <span class="b">perturb</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span><span class="f">;</span><span class="f">)</span> <span class="f">{</span>
<a name="982" /><a href="dictobject.c.html#982"><span class="True">     982:</span></a>         <span class="b">perturb</span> <span class="f">&gt;&gt;=</span> <a href="macros_ref.html#_UEVSVFVSQl9TSElGVF8w"><span class="b">PERTURB_SHIFT</span></a><span class="f">;</span>
<a name="983" /><a href="dictobject.c.html#983"><span class="True">     983:</span></a>         <span class="b">i</span> <span class="f">=</span> <span class="b">mask</span> <span class="f">&amp;</span> <span class="f">(</span><span class="f">(</span><span class="b">i</span> <span class="f">&lt;&lt;</span> <span class="c">2</span><span class="f">)</span> <span class="f">+</span> <span class="b">i</span> <span class="f">+</span> <span class="b">perturb</span> <span class="f">+</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="984" /><a href="dictobject.c.html#984"><span class="True">     984:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="985" /><a href="dictobject.c.html#985"><span class="True">     985:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="986" /><a href="dictobject.c.html#986"><span class="True">     986:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="987" /><a href="dictobject.c.html#987"><span class="True">     987:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="988" /><a href="dictobject.c.html#988"><span class="True">     988:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="989" /><a href="dictobject.c.html#989"><span class="True">     989:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="990" /><a href="dictobject.c.html#990"><span class="True">     990:</span></a>         <span class="f">}</span>
<a name="991" /><a href="dictobject.c.html#991"><span class="True">     991:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="992" /><a href="dictobject.c.html#992"><span class="True">     992:</span></a>         <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="993" /><a href="dictobject.c.html#993"><span class="True">     993:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="994" /><a href="dictobject.c.html#994"><span class="True">     994:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">==</span> <span class="b">key</span> <span class="f">||</span>
<a name="995" /><a href="dictobject.c.html#995"><span class="True">     995:</span></a>             <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">==</span> <span class="b">hash</span> <span class="f">&amp;&amp;</span> <span class="b">unicode_eq</span><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="996" /><a href="dictobject.c.html#996"><span class="True">     996:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="997" /><a href="dictobject.c.html#997"><span class="True">     997:</span></a>                 <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="998" /><a href="dictobject.c.html#998"><span class="True">     998:</span></a>             <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="999" /><a href="dictobject.c.html#999"><span class="True">     999:</span></a>             <span class="m">return</span> <span class="b">ix</span><span class="f">;</span>
<a name="1000" /><a href="dictobject.c.html#1000"><span class="True">    1000:</span></a>         <span class="f">}</span>
<a name="1001" /><a href="dictobject.c.html#1001"><span class="True">    1001:</span></a>     <span class="f">}</span>
<a name="1002" /><a href="dictobject.c.html#1002"><span class="True">    1002:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">;</span>          <span class="k">/* NOT REACHED */</span>
<a name="1003" /><a href="dictobject.c.html#1003"><span class="True">    1003:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1004" /><a href="dictobject.c.html#1004"><span class="True">    1004:</span></a> <span class="f">}</span>
<a name="1005" /><span class="True">    1005:</span> 
<a name="1006" /><a href="dictobject.c.html#1006"><span class="True">    1006:</span></a> <span class="m">int</span>
<a name="1007" /><a href="dictobject.c.html#1007"><span class="True">    1007:</span></a> <span class="b">_PyDict_HasOnlyStringKeys</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">)</span>
<a name="1008" /><a href="dictobject.c.html#1008"><span class="True">    1008:</span></a> <span class="f">{</span>
<a name="1009" /><a href="dictobject.c.html#1009"><span class="True">    1009:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">pos</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="1010" /><a href="dictobject.c.html#1010"><span class="True">    1010:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="f">*</span><span class="b">value</span><span class="f">;</span>
<a name="1011" /><a href="dictobject.c.html#1011"><span class="True">    1011:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">dict</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1012" /><span class="True">    1012:</span>     <span class="k">/* Shortcut */</span>
<a name="1013" /><a href="dictobject.c.html#1013"><span class="True">    1013:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dict</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">!=</span> <span class="b">lookdict</span><span class="f">)</span>
<a name="1014" /><a href="dictobject.c.html#1014"><span class="True">    1014:</span></a>         <span class="m">return</span> <span class="c">1</span><span class="f">;</span>
<a name="1015" /><a href="dictobject.c.html#1015"><span class="True">    1015:</span></a>     <span class="m">while</span> <span class="f">(</span><span class="b">PyDict_Next</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">pos</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">key</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value</span><span class="f">)</span><span class="f">)</span>
<a name="1016" /><a href="dictobject.c.html#1016"><span class="True">    1016:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrXzA_"><span class="b">PyUnicode_Check</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">)</span>
<a name="1017" /><a href="dictobject.c.html#1017"><span class="True">    1017:</span></a>             <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1018" /><a href="dictobject.c.html#1018"><span class="True">    1018:</span></a>     <span class="m">return</span> <span class="c">1</span><span class="f">;</span>
<a name="1019" /><a href="dictobject.c.html#1019"><span class="True">    1019:</span></a> <span class="f">}</span>
<a name="1020" /><span class="True">    1020:</span> 
<a name="1021" /><span class="True">    1021:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_TUFJTlRBSU5fVFJBQ0tJTkdfMA__"><span class="b">MAINTAIN_TRACKING</span></a><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span> \
<a name="1022" /><span class="True">    1022:</span>     <span class="m">do</span> <span class="f">{</span> \
<a name="1023" /><span class="True">    1023:</span>         <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_X1B5T2JqZWN0X0dDX0lTX1RSQUNLRURfMA__"><span class="b">_PyObject_GC_IS_TRACKED</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span> \
<a name="1024" /><span class="True">    1024:</span>             <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5T2JqZWN0X0dDX01BWV9CRV9UUkFDS0VEXzA_"><span class="b">_PyObject_GC_MAY_BE_TRACKED</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span> \
<a name="1025" /><span class="True">    1025:</span>                 <a href="macros_ref.html#_X1B5T2JqZWN0X0dDX01BWV9CRV9UUkFDS0VEXzA_"><span class="b">_PyObject_GC_MAY_BE_TRACKED</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span> \
<a name="1026" /><span class="True">    1026:</span>                 <a href="macros_ref.html#_X1B5T2JqZWN0X0dDX1RSQUNLXzA_"><span class="b">_PyObject_GC_TRACK</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span> \
<a name="1027" /><span class="True">    1027:</span>             <span class="f">}</span> \
<a name="1028" /><span class="True">    1028:</span>         <span class="f">}</span> \
<a name="1029" /><span class="True">    1029:</span>     <span class="f">}</span> <span class="m">while</span><span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="1030" /><span class="True">    1030:</span> 
<a name="1031" /><a href="dictobject.c.html#1031"><span class="True">    1031:</span></a> <span class="m">void</span>
<a name="1032" /><a href="dictobject.c.html#1032"><span class="True">    1032:</span></a> <span class="b">_PyDict_MaybeUntrack</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">)</span>
<a name="1033" /><a href="dictobject.c.html#1033"><span class="True">    1033:</span></a> <span class="f">{</span>
<a name="1034" /><a href="dictobject.c.html#1034"><span class="True">    1034:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="1035" /><a href="dictobject.c.html#1035"><span class="True">    1035:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">;</span>
<a name="1036" /><a href="dictobject.c.html#1036"><span class="True">    1036:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">numentries</span><span class="f">;</span>
<a name="1037" /><a href="dictobject.c.html#1037"><span class="True">    1037:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep0</span><span class="f">;</span>
<a name="1038" /><span class="True">    1038:</span> 
<a name="1039" /><a href="dictobject.c.html#1039"><span class="True">    1039:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrRXhhY3RfMA__"><span class="b">PyDict_CheckExact</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span> <span class="f">||</span> <span class="f">!</span><a href="macros_ref.html#_X1B5T2JqZWN0X0dDX0lTX1RSQUNLRURfMA__"><span class="b">_PyObject_GC_IS_TRACKED</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span>
<a name="1040" /><a href="dictobject.c.html#1040"><span class="True">    1040:</span></a>         <span class="m">return</span><span class="f">;</span>
<a name="1041" /><span class="True">    1041:</span> 
<a name="1042" /><a href="dictobject.c.html#1042"><span class="True">    1042:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">op</span><span class="f">;</span>
<a name="1043" /><a href="dictobject.c.html#1043"><span class="True">    1043:</span></a>     <span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="1044" /><a href="dictobject.c.html#1044"><span class="True">    1044:</span></a>     <span class="b">numentries</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="1045" /><a href="dictobject.c.html#1045"><span class="True">    1045:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1046" /><a href="dictobject.c.html#1046"><span class="True">    1046:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">numentries</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="1047" /><a href="dictobject.c.html#1047"><span class="True">    1047:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="b">value</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">)</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="1048" /><a href="dictobject.c.html#1048"><span class="True">    1048:</span></a>                 <span class="m">continue</span><span class="f">;</span>
<a name="1049" /><a href="dictobject.c.html#1049"><span class="True">    1049:</span></a>             <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5T2JqZWN0X0dDX01BWV9CRV9UUkFDS0VEXzA_"><span class="b">_PyObject_GC_MAY_BE_TRACKED</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1050" /><a href="dictobject.c.html#1050"><span class="True">    1050:</span></a>                 <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_X1B5T2JqZWN0X0dDX01BWV9CRV9UUkFDS0VEXzA_"><span class="b">_PyObject_GC_MAY_BE_TRACKED</span></a><span class="f">(</span><span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_key</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1051" /><a href="dictobject.c.html#1051"><span class="True">    1051:</span></a>                 <span class="m">return</span><span class="f">;</span>
<a name="1052" /><a href="dictobject.c.html#1052"><span class="True">    1052:</span></a>             <span class="f">}</span>
<a name="1053" /><a href="dictobject.c.html#1053"><span class="True">    1053:</span></a>         <span class="f">}</span>
<a name="1054" /><a href="dictobject.c.html#1054"><span class="True">    1054:</span></a>     <span class="f">}</span>
<a name="1055" /><a href="dictobject.c.html#1055"><span class="True">    1055:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="1056" /><a href="dictobject.c.html#1056"><span class="True">    1056:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">numentries</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="1057" /><a href="dictobject.c.html#1057"><span class="True">    1057:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="b">value</span> <span class="f">=</span> <span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span><span class="f">)</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="1058" /><a href="dictobject.c.html#1058"><span class="True">    1058:</span></a>                 <span class="m">continue</span><span class="f">;</span>
<a name="1059" /><a href="dictobject.c.html#1059"><span class="True">    1059:</span></a>             <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5T2JqZWN0X0dDX01BWV9CRV9UUkFDS0VEXzA_"><span class="b">_PyObject_GC_MAY_BE_TRACKED</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span> <span class="f">||</span>
<a name="1060" /><a href="dictobject.c.html#1060"><span class="True">    1060:</span></a>                 <a href="macros_ref.html#_X1B5T2JqZWN0X0dDX01BWV9CRV9UUkFDS0VEXzA_"><span class="b">_PyObject_GC_MAY_BE_TRACKED</span></a><span class="f">(</span><span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_key</span><span class="f">)</span><span class="f">)</span>
<a name="1061" /><a href="dictobject.c.html#1061"><span class="True">    1061:</span></a>                 <span class="m">return</span><span class="f">;</span>
<a name="1062" /><a href="dictobject.c.html#1062"><span class="True">    1062:</span></a>         <span class="f">}</span>
<a name="1063" /><a href="dictobject.c.html#1063"><span class="True">    1063:</span></a>     <span class="f">}</span>
<a name="1064" /><a href="dictobject.c.html#1064"><span class="True">    1064:</span></a>     <a href="macros_ref.html#_X1B5T2JqZWN0X0dDX1VOVFJBQ0tfMA__"><span class="b">_PyObject_GC_UNTRACK</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">;</span>
<a name="1065" /><a href="dictobject.c.html#1065"><span class="True">    1065:</span></a> <span class="f">}</span>
<a name="1066" /><span class="True">    1066:</span> 
<a name="1067" /><span class="True">    1067:</span> <span class="k">/* Internal function to find slot for an item from its hash</span>
<a name="1068" /><span class="True">    1068:</span> <span class="k">   when it is known that the key is not present in the dict.</span>
<a name="1069" /><span class="True">    1069:</span> <span class="k"></span>
<a name="1070" /><span class="True">    1070:</span> <span class="k">   The dict must be combined. */</span>
<a name="1071" /><a href="dictobject.c.html#1071"><span class="True">    1071:</span></a> <span class="m">static</span> <span class="m">void</span>
<a name="1072" /><a href="dictobject.c.html#1072"><span class="True">    1072:</span></a> <span class="b">find_empty_slot</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span>
<a name="1073" /><a href="dictobject.c.html#1073"><span class="True">    1073:</span></a>                 <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">hashpos</span><span class="f">)</span>
<a name="1074" /><a href="dictobject.c.html#1074"><span class="True">    1074:</span></a> <span class="f">{</span>
<a name="1075" /><a href="dictobject.c.html#1075"><span class="True">    1075:</span></a>     <span class="b">size_t</span> <span class="b">i</span><span class="f">;</span>
<a name="1076" /><a href="dictobject.c.html#1076"><span class="True">    1076:</span></a>     <span class="b">size_t</span> <span class="b">mask</span> <span class="f">=</span> <a href="macros_ref.html#_REtfTUFTS18w"><span class="b">DK_MASK</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="1077" /><a href="dictobject.c.html#1077"><span class="True">    1077:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="1078" /><a href="dictobject.c.html#1078"><span class="True">    1078:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">,</span> <span class="f">*</span><span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="1079" /><span class="True">    1079:</span> 
<a name="1080" /><a href="dictobject.c.html#1080"><span class="True">    1080:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1081" /><a href="dictobject.c.html#1081"><span class="True">    1081:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">hashpos</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1082" /><a href="dictobject.c.html#1082"><span class="True">    1082:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1083" /><span class="True">    1083:</span> 
<a name="1084" /><a href="dictobject.c.html#1084"><span class="True">    1084:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">)</span>
<a name="1085" /><a href="dictobject.c.html#1085"><span class="True">    1085:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">=</span> <span class="b">lookdict</span><span class="f">;</span>
<a name="1086" /><a href="dictobject.c.html#1086"><span class="True">    1086:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="b">hash</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">;</span>
<a name="1087" /><a href="dictobject.c.html#1087"><span class="True">    1087:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="1088" /><a href="dictobject.c.html#1088"><span class="True">    1088:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">size_t</span> <span class="b">perturb</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span> <span class="b">ix</span> <span class="f">!=</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span><span class="f">)</span> <span class="f">{</span>
<a name="1089" /><a href="dictobject.c.html#1089"><span class="True">    1089:</span></a>         <span class="b">perturb</span> <span class="f">&gt;&gt;=</span> <a href="macros_ref.html#_UEVSVFVSQl9TSElGVF8w"><span class="b">PERTURB_SHIFT</span></a><span class="f">;</span>
<a name="1090" /><a href="dictobject.c.html#1090"><span class="True">    1090:</span></a>         <span class="b">i</span> <span class="f">=</span> <span class="f">(</span><span class="b">i</span> <span class="f">&lt;&lt;</span> <span class="c">2</span><span class="f">)</span> <span class="f">+</span> <span class="b">i</span> <span class="f">+</span> <span class="b">perturb</span> <span class="f">+</span> <span class="c">1</span><span class="f">;</span>
<a name="1091" /><a href="dictobject.c.html#1091"><span class="True">    1091:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">i</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">)</span><span class="f">;</span>
<a name="1092" /><a href="dictobject.c.html#1092"><span class="True">    1092:</span></a>     <span class="f">}</span>
<a name="1093" /><a href="dictobject.c.html#1093"><span class="True">    1093:</span></a>     <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">]</span><span class="f">;</span>
<a name="1094" /><a href="dictobject.c.html#1094"><span class="True">    1094:</span></a>     <span class="f">*</span><span class="b">hashpos</span> <span class="f">=</span> <span class="b">i</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">;</span>
<a name="1095" /><a href="dictobject.c.html#1095"><span class="True">    1095:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1096" /><a href="dictobject.c.html#1096"><span class="True">    1096:</span></a>     <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="1097" /><a href="dictobject.c.html#1097"><span class="True">    1097:</span></a> <span class="f">}</span>
<a name="1098" /><span class="True">    1098:</span> 
<a name="1099" /><a href="dictobject.c.html#1099"><span class="True">    1099:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="1100" /><a href="dictobject.c.html#1100"><span class="True">    1100:</span></a> <span class="b">insertion_resize</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="1101" /><a href="dictobject.c.html#1101"><span class="True">    1101:</span></a> <span class="f">{</span>
<a name="1102" /><a href="dictobject.c.html#1102"><span class="True">    1102:</span></a>     <span class="m">return</span> <span class="b">dictresize</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <a href="macros_ref.html#_R1JPV1RIX1JBVEVfMA__"><span class="b">GROWTH_RATE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1103" /><a href="dictobject.c.html#1103"><span class="True">    1103:</span></a> <span class="f">}</span>
<a name="1104" /><span class="True">    1104:</span> 
<a name="1105" /><span class="True">    1105:</span> <span class="k">/*</span>
<a name="1106" /><span class="True">    1106:</span> <span class="k">Internal routine to insert a new item into the table.</span>
<a name="1107" /><span class="True">    1107:</span> <span class="k">Used both by the internal resize routine and by the public insert routine.</span>
<a name="1108" /><span class="True">    1108:</span> <span class="k">Returns -1 if an error occurred, or 0 on success.</span>
<a name="1109" /><span class="True">    1109:</span> <span class="k">*/</span>
<a name="1110" /><a href="dictobject.c.html#1110"><span class="True">    1110:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="1111" /><a href="dictobject.c.html#1111"><span class="True">    1111:</span></a> <span class="b">insertdict</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">)</span>
<a name="1112" /><a href="dictobject.c.html#1112"><span class="True">    1112:</span></a> <span class="f">{</span>
<a name="1113" /><a href="dictobject.c.html#1113"><span class="True">    1113:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">old_value</span><span class="f">;</span>
<a name="1114" /><a href="dictobject.c.html#1114"><span class="True">    1114:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1115" /><a href="dictobject.c.html#1115"><span class="True">    1115:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">,</span> <span class="f">*</span><span class="b">ep0</span><span class="f">;</span>
<a name="1116" /><a href="dictobject.c.html#1116"><span class="True">    1116:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">hashpos</span><span class="f">,</span> <span class="b">ix</span><span class="f">;</span>
<a name="1117" /><span class="True">    1117:</span> 
<a name="1118" /><a href="dictobject.c.html#1118"><span class="True">    1118:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1119" /><a href="dictobject.c.html#1119"><span class="True">    1119:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="1120" /><a href="dictobject.c.html#1120"><span class="True">    1120:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1121" /><a href="dictobject.c.html#1121"><span class="True">    1121:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">insertion_resize</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1122" /><a href="dictobject.c.html#1122"><span class="True">    1122:</span></a>             <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="1123" /><a href="dictobject.c.html#1123"><span class="True">    1123:</span></a>     <span class="f">}</span>
<a name="1124" /><span class="True">    1124:</span> 
<a name="1125" /><a href="dictobject.c.html#1125"><span class="True">    1125:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="1126" /><a href="dictobject.c.html#1126"><span class="True">    1126:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="1127" /><a href="dictobject.c.html#1127"><span class="True">    1127:</span></a>         <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="1128" /><span class="True">    1128:</span> 
<a name="1129" /><a href="dictobject.c.html#1129"><span class="True">    1129:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">==</span> <span class="b">lookdict</span><span class="f">)</span><span class="f">;</span>
<a name="1130" /><a href="dictobject.c.html#1130"><span class="True">    1130:</span></a>     <a href="macros_ref.html#_TUFJTlRBSU5fVFJBQ0tJTkdfMA__"><span class="b">MAINTAIN_TRACKING</span></a><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="1131" /><span class="True">    1131:</span> 
<a name="1132" /><span class="True">    1132:</span>     <span class="k">/* When insertion order is different from shared key, we can&apos;t share</span>
<a name="1133" /><span class="True">    1133:</span> <span class="k">     * the key anymore.  Convert this instance to combine table.</span>
<a name="1134" /><span class="True">    1134:</span> <span class="k">     */</span>
<a name="1135" /><a href="dictobject.c.html#1135"><span class="True">    1135:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">&amp;&amp;</span>
<a name="1136" /><a href="dictobject.c.html#1136"><span class="True">    1136:</span></a>         <span class="f">(</span><span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <span class="c">0</span> <span class="f">&amp;&amp;</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">!=</span> <span class="b">ix</span><span class="f">)</span> <span class="f">||</span>
<a name="1137" /><a href="dictobject.c.html#1137"><span class="True">    1137:</span></a>          <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">&amp;&amp;</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">!=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1138" /><a href="dictobject.c.html#1138"><span class="True">    1138:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">insertion_resize</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1139" /><a href="dictobject.c.html#1139"><span class="True">    1139:</span></a>             <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="1140" /><a href="dictobject.c.html#1140"><span class="True">    1140:</span></a>         <span class="b">find_empty_slot</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="1141" /><a href="dictobject.c.html#1141"><span class="True">    1141:</span></a>         <span class="b">ix</span> <span class="f">=</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="1142" /><a href="dictobject.c.html#1142"><span class="True">    1142:</span></a>     <span class="f">}</span>
<a name="1143" /><span class="True">    1143:</span> 
<a name="1144" /><a href="dictobject.c.html#1144"><span class="True">    1144:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1145" /><span class="True">    1145:</span>         <span class="k">/* Insert into new slot. */</span>
<a name="1146" /><a href="dictobject.c.html#1146"><span class="True">    1146:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span> <span class="f">&lt;=</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="1147" /><span class="True">    1147:</span>             <span class="k">/* Need to resize. */</span>
<a name="1148" /><a href="dictobject.c.html#1148"><span class="True">    1148:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">insertion_resize</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1149" /><a href="dictobject.c.html#1149"><span class="True">    1149:</span></a>                 <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="1150" /><a href="dictobject.c.html#1150"><span class="True">    1150:</span></a>             <span class="b">find_empty_slot</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="1151" /><a href="dictobject.c.html#1151"><span class="True">    1151:</span></a>         <span class="f">}</span>
<a name="1152" /><a href="dictobject.c.html#1152"><span class="True">    1152:</span></a>         <span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="1153" /><a href="dictobject.c.html#1153"><span class="True">    1153:</span></a>         <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">]</span><span class="f">;</span>
<a name="1154" /><a href="dictobject.c.html#1154"><span class="True">    1154:</span></a>         <span class="b">dk_set_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">,</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">)</span><span class="f">;</span>
<a name="1155" /><a href="dictobject.c.html#1155"><span class="True">    1155:</span></a>         <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">=</span> <span class="b">key</span><span class="f">;</span>
<a name="1156" /><a href="dictobject.c.html#1156"><span class="True">    1156:</span></a>         <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span>
<a name="1157" /><a href="dictobject.c.html#1157"><span class="True">    1157:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span> <span class="f">{</span>
<a name="1158" /><a href="dictobject.c.html#1158"><span class="True">    1158:</span></a>             <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">]</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1159" /><a href="dictobject.c.html#1159"><span class="True">    1159:</span></a>             <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">]</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="1160" /><a href="dictobject.c.html#1160"><span class="True">    1160:</span></a>         <span class="f">}</span>
<a name="1161" /><a href="dictobject.c.html#1161"><span class="True">    1161:</span></a>         <span class="m">else</span> <span class="f">{</span>
<a name="1162" /><a href="dictobject.c.html#1162"><span class="True">    1162:</span></a>             <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="1163" /><a href="dictobject.c.html#1163"><span class="True">    1163:</span></a>         <span class="f">}</span>
<a name="1164" /><a href="dictobject.c.html#1164"><span class="True">    1164:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">++</span><span class="f">;</span>
<a name="1165" /><a href="dictobject.c.html#1165"><span class="True">    1165:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1166" /><a href="dictobject.c.html#1166"><span class="True">    1166:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span><span class="f">--</span><span class="f">;</span>
<a name="1167" /><a href="dictobject.c.html#1167"><span class="True">    1167:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">++</span><span class="f">;</span>
<a name="1168" /><a href="dictobject.c.html#1168"><span class="True">    1168:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="1169" /><a href="dictobject.c.html#1169"><span class="True">    1169:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1170" /><a href="dictobject.c.html#1170"><span class="True">    1170:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1171" /><a href="dictobject.c.html#1171"><span class="True">    1171:</span></a>     <span class="f">}</span>
<a name="1172" /><span class="True">    1172:</span> 
<a name="1173" /><a href="dictobject.c.html#1173"><span class="True">    1173:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">value_addr</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1174" /><span class="True">    1174:</span> 
<a name="1175" /><a href="dictobject.c.html#1175"><span class="True">    1175:</span></a>     <span class="b">old_value</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1176" /><a href="dictobject.c.html#1176"><span class="True">    1176:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">old_value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1177" /><a href="dictobject.c.html#1177"><span class="True">    1177:</span></a>         <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="1178" /><a href="dictobject.c.html#1178"><span class="True">    1178:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1179" /><a href="dictobject.c.html#1179"><span class="True">    1179:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1180" /><span class="True">    1180:</span> 
<a name="1181" /><a href="dictobject.c.html#1181"><span class="True">    1181:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">old_value</span><span class="f">)</span><span class="f">;</span> <span class="k">/* which **CAN** re-enter (see issue #22653) */</span>
<a name="1182" /><a href="dictobject.c.html#1182"><span class="True">    1182:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1183" /><a href="dictobject.c.html#1183"><span class="True">    1183:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1184" /><a href="dictobject.c.html#1184"><span class="True">    1184:</span></a>     <span class="f">}</span>
<a name="1185" /><span class="True">    1185:</span> 
<a name="1186" /><span class="True">    1186:</span>     <span class="k">/* pending state */</span>
<a name="1187" /><a href="dictobject.c.html#1187"><span class="True">    1187:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1188" /><a href="dictobject.c.html#1188"><span class="True">    1188:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span><span class="f">;</span>
<a name="1189" /><a href="dictobject.c.html#1189"><span class="True">    1189:</span></a>     <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="1190" /><a href="dictobject.c.html#1190"><span class="True">    1190:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">++</span><span class="f">;</span>
<a name="1191" /><a href="dictobject.c.html#1191"><span class="True">    1191:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1192" /><a href="dictobject.c.html#1192"><span class="True">    1192:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1193" /><a href="dictobject.c.html#1193"><span class="True">    1193:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1194" /><a href="dictobject.c.html#1194"><span class="True">    1194:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1195" /><span class="True">    1195:</span> 
<a name="1196" /><a href="dictobject.c.html#1196"><span class="True">    1196:</span></a> <span class="b">Fail</span><span class="f">:</span>
<a name="1197" /><a href="dictobject.c.html#1197"><span class="True">    1197:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="1198" /><a href="dictobject.c.html#1198"><span class="True">    1198:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1199" /><a href="dictobject.c.html#1199"><span class="True">    1199:</span></a>     <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1200" /><a href="dictobject.c.html#1200"><span class="True">    1200:</span></a> <span class="f">}</span>
<a name="1201" /><span class="True">    1201:</span> 
<a name="1202" /><span class="True">    1202:</span> <span class="k">/*</span>
<a name="1203" /><span class="True">    1203:</span> <span class="k">Internal routine used by dictresize() to insert an item which is</span>
<a name="1204" /><span class="True">    1204:</span> <span class="k">known to be absent from the dict.  This routine also assumes that</span>
<a name="1205" /><span class="True">    1205:</span> <span class="k">the dict contains no deleted entries.  Besides the performance benefit,</span>
<a name="1206" /><span class="True">    1206:</span> <span class="k">using insertdict() in dictresize() is dangerous (SF bug #1456209).</span>
<a name="1207" /><span class="True">    1207:</span> <span class="k">Note that no refcounts are changed by this routine; if needed, the caller</span>
<a name="1208" /><span class="True">    1208:</span> <span class="k">is responsible for incref&apos;ing `key` and `value`.</span>
<a name="1209" /><span class="True">    1209:</span> <span class="k">Neither mp-&gt;ma_used nor k-&gt;dk_usable are modified by this routine; the caller</span>
<a name="1210" /><span class="True">    1210:</span> <span class="k">must set them correctly</span>
<a name="1211" /><span class="True">    1211:</span> <span class="k">*/</span>
<a name="1212" /><a href="dictobject.c.html#1212"><span class="True">    1212:</span></a> <span class="m">static</span> <span class="m">void</span>
<a name="1213" /><a href="dictobject.c.html#1213"><span class="True">    1213:</span></a> <span class="b">insertdict_clean</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span>
<a name="1214" /><a href="dictobject.c.html#1214"><span class="True">    1214:</span></a>                  <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">)</span>
<a name="1215" /><a href="dictobject.c.html#1215"><span class="True">    1215:</span></a> <span class="f">{</span>
<a name="1216" /><a href="dictobject.c.html#1216"><span class="True">    1216:</span></a>     <span class="b">size_t</span> <span class="b">i</span><span class="f">;</span>
<a name="1217" /><a href="dictobject.c.html#1217"><span class="True">    1217:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">k</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="1218" /><a href="dictobject.c.html#1218"><span class="True">    1218:</span></a>     <span class="b">size_t</span> <span class="b">mask</span> <span class="f">=</span> <span class="f">(</span><span class="b">size_t</span><span class="f">)</span><a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">k</span><span class="f">)</span><span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1219" /><a href="dictobject.c.html#1219"><span class="True">    1219:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="1220" /><a href="dictobject.c.html#1220"><span class="True">    1220:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">;</span>
<a name="1221" /><span class="True">    1221:</span> 
<a name="1222" /><a href="dictobject.c.html#1222"><span class="True">    1222:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">k</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1223" /><a href="dictobject.c.html#1223"><span class="True">    1223:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1224" /><a href="dictobject.c.html#1224"><span class="True">    1224:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">key</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1225" /><a href="dictobject.c.html#1225"><span class="True">    1225:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span> <span class="b">k</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">==</span> <span class="b">lookdict</span><span class="f">)</span><span class="f">;</span>
<a name="1226" /><a href="dictobject.c.html#1226"><span class="True">    1226:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="b">hash</span> <span class="f">&amp;</span> <span class="b">mask</span><span class="f">;</span>
<a name="1227" /><a href="dictobject.c.html#1227"><span class="True">    1227:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">size_t</span> <span class="b">perturb</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span> <span class="b">dk_get_index</span><span class="f">(</span><span class="b">k</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span> <span class="f">!=</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span><span class="f">)</span> <span class="f">{</span>
<a name="1228" /><a href="dictobject.c.html#1228"><span class="True">    1228:</span></a>         <span class="b">perturb</span> <span class="f">&gt;&gt;=</span> <a href="macros_ref.html#_UEVSVFVSQl9TSElGVF8w"><span class="b">PERTURB_SHIFT</span></a><span class="f">;</span>
<a name="1229" /><a href="dictobject.c.html#1229"><span class="True">    1229:</span></a>         <span class="b">i</span> <span class="f">=</span> <span class="b">mask</span> <span class="f">&amp;</span> <span class="f">(</span><span class="f">(</span><span class="b">i</span> <span class="f">&lt;&lt;</span> <span class="c">2</span><span class="f">)</span> <span class="f">+</span> <span class="b">i</span> <span class="f">+</span> <span class="b">perturb</span> <span class="f">+</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="1230" /><a href="dictobject.c.html#1230"><span class="True">    1230:</span></a>     <span class="f">}</span>
<a name="1231" /><a href="dictobject.c.html#1231"><span class="True">    1231:</span></a>     <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">k</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">]</span><span class="f">;</span>
<a name="1232" /><a href="dictobject.c.html#1232"><span class="True">    1232:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1233" /><a href="dictobject.c.html#1233"><span class="True">    1233:</span></a>     <span class="b">dk_set_index</span><span class="f">(</span><span class="b">k</span><span class="f">,</span> <span class="b">i</span><span class="f">,</span> <span class="b">k</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">)</span><span class="f">;</span>
<a name="1234" /><a href="dictobject.c.html#1234"><span class="True">    1234:</span></a>     <span class="b">k</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">++</span><span class="f">;</span>
<a name="1235" /><a href="dictobject.c.html#1235"><span class="True">    1235:</span></a>     <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">=</span> <span class="b">key</span><span class="f">;</span>
<a name="1236" /><a href="dictobject.c.html#1236"><span class="True">    1236:</span></a>     <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span>
<a name="1237" /><a href="dictobject.c.html#1237"><span class="True">    1237:</span></a>     <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="1238" /><a href="dictobject.c.html#1238"><span class="True">    1238:</span></a> <span class="f">}</span>
<a name="1239" /><span class="True">    1239:</span> 
<a name="1240" /><span class="True">    1240:</span> <span class="k">/*</span>
<a name="1241" /><span class="True">    1241:</span> <span class="k">Restructure the table by allocating a new table and reinserting all</span>
<a name="1242" /><span class="True">    1242:</span> <span class="k">items again.  When entries have been deleted, the new table may</span>
<a name="1243" /><span class="True">    1243:</span> <span class="k">actually be smaller than the old one.</span>
<a name="1244" /><span class="True">    1244:</span> <span class="k">If a table is split (its keys and hashes are shared, its values are not),</span>
<a name="1245" /><span class="True">    1245:</span> <span class="k">then the values are temporarily copied into the table, it is resized as</span>
<a name="1246" /><span class="True">    1246:</span> <span class="k">a combined table, then the me_value slots in the old table are NULLed out.</span>
<a name="1247" /><span class="True">    1247:</span> <span class="k">After resizing a table is always combined,</span>
<a name="1248" /><span class="True">    1248:</span> <span class="k">but can be resplit by make_keys_shared().</span>
<a name="1249" /><span class="True">    1249:</span> <span class="k">*/</span>
<a name="1250" /><a href="dictobject.c.html#1250"><span class="True">    1250:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="1251" /><a href="dictobject.c.html#1251"><span class="True">    1251:</span></a> <span class="b">dictresize</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="b">minsize</span><span class="f">)</span>
<a name="1252" /><a href="dictobject.c.html#1252"><span class="True">    1252:</span></a> <span class="f">{</span>
<a name="1253" /><a href="dictobject.c.html#1253"><span class="True">    1253:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">newsize</span><span class="f">;</span>
<a name="1254" /><a href="dictobject.c.html#1254"><span class="True">    1254:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">oldkeys</span><span class="f">;</span>
<a name="1255" /><a href="dictobject.c.html#1255"><span class="True">    1255:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">oldvalues</span><span class="f">;</span>
<a name="1256" /><a href="dictobject.c.html#1256"><span class="True">    1256:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep0</span><span class="f">;</span>
<a name="1257" /><span class="True">    1257:</span> 
<a name="1258" /><span class="True">    1258:</span>     <span class="k">/* Find the smallest table size &gt; minused. */</span>
<a name="1259" /><a href="dictobject.c.html#1259"><span class="True">    1259:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">newsize</span> <span class="f">=</span> <a href="macros_ref.html#_UHlEaWN0X01JTlNJWkVfMA__"><span class="b">PyDict_MINSIZE</span></a><span class="f">;</span>
<a name="1260" /><a href="dictobject.c.html#1260"><span class="True">    1260:</span></a>          <span class="b">newsize</span> <span class="f">&lt;</span> <span class="b">minsize</span> <span class="f">&amp;&amp;</span> <span class="b">newsize</span> <span class="f">&gt;</span> <span class="c">0</span><span class="f">;</span>
<a name="1261" /><a href="dictobject.c.html#1261"><span class="True">    1261:</span></a>          <span class="b">newsize</span> <span class="f">&lt;&lt;=</span> <span class="c">1</span><span class="f">)</span>
<a name="1262" /><a href="dictobject.c.html#1262"><span class="True">    1262:</span></a>         <span class="f">;</span>
<a name="1263" /><a href="dictobject.c.html#1263"><span class="True">    1263:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">newsize</span> <span class="f">&lt;=</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="1264" /><a href="dictobject.c.html#1264"><span class="True">    1264:</span></a>         <span class="b">PyErr_NoMemory</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1265" /><a href="dictobject.c.html#1265"><span class="True">    1265:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1266" /><a href="dictobject.c.html#1266"><span class="True">    1266:</span></a>     <span class="f">}</span>
<a name="1267" /><a href="dictobject.c.html#1267"><span class="True">    1267:</span></a>     <span class="b">oldkeys</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="1268" /><a href="dictobject.c.html#1268"><span class="True">    1268:</span></a>     <span class="b">oldvalues</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">;</span>
<a name="1269" /><span class="True">    1269:</span>     <span class="k">/* Allocate a new table. */</span>
<a name="1270" /><a href="dictobject.c.html#1270"><span class="True">    1270:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">=</span> <span class="b">new_keys_object</span><span class="f">(</span><span class="b">newsize</span><span class="f">)</span><span class="f">;</span>
<a name="1271" /><a href="dictobject.c.html#1271"><span class="True">    1271:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1272" /><a href="dictobject.c.html#1272"><span class="True">    1272:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">=</span> <span class="b">oldkeys</span><span class="f">;</span>
<a name="1273" /><a href="dictobject.c.html#1273"><span class="True">    1273:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1274" /><a href="dictobject.c.html#1274"><span class="True">    1274:</span></a>     <span class="f">}</span>
<a name="1275" /><span class="True">    1275:</span>     <span class="l">// New table must be large enough.</span>
<a name="1276" /><a href="dictobject.c.html#1276"><span class="True">    1276:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span> <span class="f">&gt;=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span><span class="f">;</span>
<a name="1277" /><a href="dictobject.c.html#1277"><span class="True">    1277:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">oldkeys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">==</span> <span class="b">lookdict</span><span class="f">)</span>
<a name="1278" /><a href="dictobject.c.html#1278"><span class="True">    1278:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">=</span> <span class="b">lookdict</span><span class="f">;</span>
<a name="1279" /><a href="dictobject.c.html#1279"><span class="True">    1279:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1280" /><a href="dictobject.c.html#1280"><span class="True">    1280:</span></a>     <span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">oldkeys</span><span class="f">)</span><span class="f">;</span>
<a name="1281" /><span class="True">    1281:</span>     <span class="k">/* Main loop below assumes we can transfer refcount to new keys</span>
<a name="1282" /><span class="True">    1282:</span> <span class="k">     * and that value is stored in me_value.</span>
<a name="1283" /><span class="True">    1283:</span> <span class="k">     * Increment ref-counts and copy values here to compensate</span>
<a name="1284" /><span class="True">    1284:</span> <span class="k">     * This (resizing a split table) should be relatively rare */</span>
<a name="1285" /><a href="dictobject.c.html#1285"><span class="True">    1285:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">oldvalues</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1286" /><a href="dictobject.c.html#1286"><span class="True">    1286:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">oldkeys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="1287" /><a href="dictobject.c.html#1287"><span class="True">    1287:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">oldvalues</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1288" /><a href="dictobject.c.html#1288"><span class="True">    1288:</span></a>                 <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_key</span><span class="f">)</span><span class="f">;</span>
<a name="1289" /><a href="dictobject.c.html#1289"><span class="True">    1289:</span></a>                 <span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span> <span class="f">=</span> <span class="b">oldvalues</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="1290" /><a href="dictobject.c.html#1290"><span class="True">    1290:</span></a>             <span class="f">}</span>
<a name="1291" /><a href="dictobject.c.html#1291"><span class="True">    1291:</span></a>         <span class="f">}</span>
<a name="1292" /><a href="dictobject.c.html#1292"><span class="True">    1292:</span></a>     <span class="f">}</span>
<a name="1293" /><span class="True">    1293:</span>     <span class="k">/* Main loop */</span>
<a name="1294" /><a href="dictobject.c.html#1294"><span class="True">    1294:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">oldkeys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="1295" /><a href="dictobject.c.html#1295"><span class="True">    1295:</span></a>         <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="1296" /><a href="dictobject.c.html#1296"><span class="True">    1296:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1297" /><a href="dictobject.c.html#1297"><span class="True">    1297:</span></a>             <span class="b">insertdict_clean</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">,</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span><span class="f">,</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">)</span><span class="f">;</span>
<a name="1298" /><a href="dictobject.c.html#1298"><span class="True">    1298:</span></a>         <span class="f">}</span>
<a name="1299" /><a href="dictobject.c.html#1299"><span class="True">    1299:</span></a>     <span class="f">}</span>
<a name="1300" /><a href="dictobject.c.html#1300"><span class="True">    1300:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span> <span class="f">-=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="1301" /><a href="dictobject.c.html#1301"><span class="True">    1301:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">oldvalues</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1302" /><span class="True">    1302:</span>         <span class="k">/* NULL out me_value slot in oldkeys, in case it was shared */</span>
<a name="1303" /><a href="dictobject.c.html#1303"><span class="True">    1303:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">oldkeys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span>
<a name="1304" /><a href="dictobject.c.html#1304"><span class="True">    1304:</span></a>             <span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1305" /><a href="dictobject.c.html#1305"><span class="True">    1305:</span></a>         <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">oldkeys</span><span class="f">)</span><span class="f">;</span>
<a name="1306" /><a href="dictobject.c.html#1306"><span class="True">    1306:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">oldvalues</span> <span class="f">!=</span> <span class="b">empty_values</span><span class="f">)</span> <span class="f">{</span>
<a name="1307" /><a href="dictobject.c.html#1307"><span class="True">    1307:</span></a>             <a href="macros_ref.html#_ZnJlZV92YWx1ZXNfMA__"><span class="b">free_values</span></a><span class="f">(</span><span class="b">oldvalues</span><span class="f">)</span><span class="f">;</span>
<a name="1308" /><a href="dictobject.c.html#1308"><span class="True">    1308:</span></a>         <span class="f">}</span>
<a name="1309" /><a href="dictobject.c.html#1309"><span class="True">    1309:</span></a>     <span class="f">}</span>
<a name="1310" /><a href="dictobject.c.html#1310"><span class="True">    1310:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="1311" /><a href="dictobject.c.html#1311"><span class="True">    1311:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">oldkeys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">!=</span> <span class="b">lookdict_split</span><span class="f">)</span><span class="f">;</span>
<a name="1312" /><a href="dictobject.c.html#1312"><span class="True">    1312:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">oldkeys</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="1313" /><a href="dictobject.c.html#1313"><span class="True">    1313:</span></a>         <a href="macros_ref.html#_REtfREVCVUdfREVDUkVGXzA_"><span class="b">DK_DEBUG_DECREF</span></a> <a href="macros_ref.html#_UHlPYmplY3RfRlJFRV8w"><span class="b">PyObject_FREE</span></a><span class="f">(</span><span class="b">oldkeys</span><span class="f">)</span><span class="f">;</span>
<a name="1314" /><a href="dictobject.c.html#1314"><span class="True">    1314:</span></a>     <span class="f">}</span>
<a name="1315" /><a href="dictobject.c.html#1315"><span class="True">    1315:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1316" /><a href="dictobject.c.html#1316"><span class="True">    1316:</span></a> <span class="f">}</span>
<a name="1317" /><span class="True">    1317:</span> 
<a name="1318" /><span class="True">    1318:</span> <span class="k">/* Returns NULL if unable to split table.</span>
<a name="1319" /><span class="True">    1319:</span> <span class="k"> * A NULL return does not necessarily indicate an error */</span>
<a name="1320" /><a href="dictobject.c.html#1320"><span class="True">    1320:</span></a> <span class="m">static</span> <span class="b">PyDictKeysObject</span> <span class="f">*</span>
<a name="1321" /><a href="dictobject.c.html#1321"><span class="True">    1321:</span></a> <span class="b">make_keys_shared</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">)</span>
<a name="1322" /><a href="dictobject.c.html#1322"><span class="True">    1322:</span></a> <span class="f">{</span>
<a name="1323" /><a href="dictobject.c.html#1323"><span class="True">    1323:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">;</span>
<a name="1324" /><a href="dictobject.c.html#1324"><span class="True">    1324:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">size</span><span class="f">;</span>
<a name="1325" /><a href="dictobject.c.html#1325"><span class="True">    1325:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="1326" /><span class="True">    1326:</span> 
<a name="1327" /><a href="dictobject.c.html#1327"><span class="True">    1327:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrRXhhY3RfMA__"><span class="b">PyDict_CheckExact</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span>
<a name="1328" /><a href="dictobject.c.html#1328"><span class="True">    1328:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1329" /><a href="dictobject.c.html#1329"><span class="True">    1329:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1330" /><a href="dictobject.c.html#1330"><span class="True">    1330:</span></a>         <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep0</span><span class="f">;</span>
<a name="1331" /><a href="dictobject.c.html#1331"><span class="True">    1331:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">values</span><span class="f">;</span>
<a name="1332" /><a href="dictobject.c.html#1332"><span class="True">    1332:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="1333" /><a href="dictobject.c.html#1333"><span class="True">    1333:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">==</span> <span class="b">lookdict</span><span class="f">)</span> <span class="f">{</span>
<a name="1334" /><a href="dictobject.c.html#1334"><span class="True">    1334:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1335" /><a href="dictobject.c.html#1335"><span class="True">    1335:</span></a>         <span class="f">}</span>
<a name="1336" /><a href="dictobject.c.html#1336"><span class="True">    1336:</span></a>         <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">==</span> <span class="b">lookdict_unicode</span><span class="f">)</span> <span class="f">{</span>
<a name="1337" /><span class="True">    1337:</span>             <span class="k">/* Remove dummy keys */</span>
<a name="1338" /><a href="dictobject.c.html#1338"><span class="True">    1338:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">dictresize</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">)</span><span class="f">)</span>
<a name="1339" /><a href="dictobject.c.html#1339"><span class="True">    1339:</span></a>                 <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1340" /><a href="dictobject.c.html#1340"><span class="True">    1340:</span></a>         <span class="f">}</span>
<a name="1341" /><a href="dictobject.c.html#1341"><span class="True">    1341:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">==</span> <span class="b">lookdict_unicode_nodummy</span><span class="f">)</span><span class="f">;</span>
<a name="1342" /><span class="True">    1342:</span>         <span class="k">/* Copy values into a new array */</span>
<a name="1343" /><a href="dictobject.c.html#1343"><span class="True">    1343:</span></a>         <span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="1344" /><a href="dictobject.c.html#1344"><span class="True">    1344:</span></a>         <span class="b">size</span> <span class="f">=</span> <a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1345" /><a href="dictobject.c.html#1345"><span class="True">    1345:</span></a>         <span class="b">values</span> <span class="f">=</span> <a href="macros_ref.html#_bmV3X3ZhbHVlc18w"><span class="b">new_values</span></a><span class="f">(</span><span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="1346" /><a href="dictobject.c.html#1346"><span class="True">    1346:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">values</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1347" /><a href="dictobject.c.html#1347"><span class="True">    1347:</span></a>             <span class="b">PyErr_SetString</span><span class="f">(</span><span class="b">PyExc_MemoryError</span><span class="f">,</span>
<a name="1348" /><a href="dictobject.c.html#1348"><span class="True">    1348:</span></a>                 <span class="e">&quot;Not enough memory to allocate new values array&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="1349" /><a href="dictobject.c.html#1349"><span class="True">    1349:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1350" /><a href="dictobject.c.html#1350"><span class="True">    1350:</span></a>         <span class="f">}</span>
<a name="1351" /><a href="dictobject.c.html#1351"><span class="True">    1351:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">size</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="1352" /><a href="dictobject.c.html#1352"><span class="True">    1352:</span></a>             <span class="b">values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">=</span> <span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span><span class="f">;</span>
<a name="1353" /><a href="dictobject.c.html#1353"><span class="True">    1353:</span></a>             <span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1354" /><a href="dictobject.c.html#1354"><span class="True">    1354:</span></a>         <span class="f">}</span>
<a name="1355" /><a href="dictobject.c.html#1355"><span class="True">    1355:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">=</span> <span class="b">lookdict_split</span><span class="f">;</span>
<a name="1356" /><a href="dictobject.c.html#1356"><span class="True">    1356:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">=</span> <span class="b">values</span><span class="f">;</span>
<a name="1357" /><a href="dictobject.c.html#1357"><span class="True">    1357:</span></a>     <span class="f">}</span>
<a name="1358" /><a href="dictobject.c.html#1358"><span class="True">    1358:</span></a>     <a href="macros_ref.html#_REtfSU5DUkVGXzA_"><span class="b">DK_INCREF</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="1359" /><a href="dictobject.c.html#1359"><span class="True">    1359:</span></a>     <span class="m">return</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="1360" /><a href="dictobject.c.html#1360"><span class="True">    1360:</span></a> <span class="f">}</span>
<a name="1361" /><span class="True">    1361:</span> 
<a name="1362" /><a href="dictobject.c.html#1362"><span class="True">    1362:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="1363" /><a href="dictobject.c.html#1363"><span class="True">    1363:</span></a> <span class="b">_PyDict_NewPresized</span><span class="f">(</span><span class="b">Py_ssize_t</span> <span class="b">minused</span><span class="f">)</span>
<a name="1364" /><a href="dictobject.c.html#1364"><span class="True">    1364:</span></a> <span class="f">{</span>
<a name="1365" /><a href="dictobject.c.html#1365"><span class="True">    1365:</span></a>     <span class="m">const</span> <span class="b">Py_ssize_t</span> <span class="b">max_presize</span> <span class="f">=</span> <span class="c">128</span> <span class="f">*</span> <span class="c">1024</span><span class="f">;</span>
<a name="1366" /><a href="dictobject.c.html#1366"><span class="True">    1366:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">newsize</span><span class="f">;</span>
<a name="1367" /><a href="dictobject.c.html#1367"><span class="True">    1367:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">new_keys</span><span class="f">;</span>
<a name="1368" /><span class="True">    1368:</span> 
<a name="1369" /><span class="True">    1369:</span>     <span class="k">/* There are no strict guarantee that returned dict can contain minused</span>
<a name="1370" /><span class="True">    1370:</span> <span class="k">     * items without resize.  So we create medium size dict instead of very</span>
<a name="1371" /><span class="True">    1371:</span> <span class="k">     * large dict or MemoryError.</span>
<a name="1372" /><span class="True">    1372:</span> <span class="k">     */</span>
<a name="1373" /><a href="dictobject.c.html#1373"><span class="True">    1373:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">minused</span> <span class="f">&gt;</span> <a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><span class="b">max_presize</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1374" /><a href="dictobject.c.html#1374"><span class="True">    1374:</span></a>         <span class="b">newsize</span> <span class="f">=</span> <span class="b">max_presize</span><span class="f">;</span>
<a name="1375" /><a href="dictobject.c.html#1375"><span class="True">    1375:</span></a>     <span class="f">}</span>
<a name="1376" /><a href="dictobject.c.html#1376"><span class="True">    1376:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="1377" /><a href="dictobject.c.html#1377"><span class="True">    1377:</span></a>         <span class="b">Py_ssize_t</span> <span class="b">minsize</span> <span class="f">=</span> <a href="macros_ref.html#_RVNUSU1BVEVfU0laRV8w"><span class="b">ESTIMATE_SIZE</span></a><span class="f">(</span><span class="b">minused</span><span class="f">)</span><span class="f">;</span>
<a name="1378" /><a href="dictobject.c.html#1378"><span class="True">    1378:</span></a>         <span class="b">newsize</span> <span class="f">=</span> <a href="macros_ref.html#_UHlEaWN0X01JTlNJWkVfMA__"><span class="b">PyDict_MINSIZE</span></a><span class="f">;</span>
<a name="1379" /><a href="dictobject.c.html#1379"><span class="True">    1379:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="b">newsize</span> <span class="f">&lt;</span> <span class="b">minsize</span><span class="f">)</span> <span class="f">{</span>
<a name="1380" /><a href="dictobject.c.html#1380"><span class="True">    1380:</span></a>             <span class="b">newsize</span> <span class="f">&lt;&lt;=</span> <span class="c">1</span><span class="f">;</span>
<a name="1381" /><a href="dictobject.c.html#1381"><span class="True">    1381:</span></a>         <span class="f">}</span>
<a name="1382" /><a href="dictobject.c.html#1382"><span class="True">    1382:</span></a>     <span class="f">}</span>
<a name="1383" /><a href="dictobject.c.html#1383"><span class="True">    1383:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_SVNfUE9XRVJfT0ZfMl8w"><span class="b">IS_POWER_OF_2</span></a><span class="f">(</span><span class="b">newsize</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1384" /><span class="True">    1384:</span> 
<a name="1385" /><a href="dictobject.c.html#1385"><span class="True">    1385:</span></a>     <span class="b">new_keys</span> <span class="f">=</span> <span class="b">new_keys_object</span><span class="f">(</span><span class="b">newsize</span><span class="f">)</span><span class="f">;</span>
<a name="1386" /><a href="dictobject.c.html#1386"><span class="True">    1386:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">new_keys</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="1387" /><a href="dictobject.c.html#1387"><span class="True">    1387:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1388" /><a href="dictobject.c.html#1388"><span class="True">    1388:</span></a>     <span class="m">return</span> <span class="b">new_dict</span><span class="f">(</span><span class="b">new_keys</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1389" /><a href="dictobject.c.html#1389"><span class="True">    1389:</span></a> <span class="f">}</span>
<a name="1390" /><span class="True">    1390:</span> 
<a name="1391" /><span class="True">    1391:</span> <span class="k">/* Note that, for historical reasons, PyDict_GetItem() suppresses all errors</span>
<a name="1392" /><span class="True">    1392:</span> <span class="k"> * that may occur (originally dicts supported only string keys, and exceptions</span>
<a name="1393" /><span class="True">    1393:</span> <span class="k"> * weren&apos;t possible).  So, while the original intent was that a NULL return</span>
<a name="1394" /><span class="True">    1394:</span> <span class="k"> * meant the key wasn&apos;t present, in reality it can mean that, or that an error</span>
<a name="1395" /><span class="True">    1395:</span> <span class="k"> * (suppressed) occurred while computing the key&apos;s hash, or that some error</span>
<a name="1396" /><span class="True">    1396:</span> <span class="k"> * (suppressed) occurred when comparing keys in the dict&apos;s internal probe</span>
<a name="1397" /><span class="True">    1397:</span> <span class="k"> * sequence.  A nasty example of the latter is when a Python-coded comparison</span>
<a name="1398" /><span class="True">    1398:</span> <span class="k"> * function hits a stack-depth error, which can cause this to return NULL</span>
<a name="1399" /><span class="True">    1399:</span> <span class="k"> * even if the key is present.</span>
<a name="1400" /><span class="True">    1400:</span> <span class="k"> */</span>
<a name="1401" /><a href="dictobject.c.html#1401"><span class="True">    1401:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="1402" /><a href="dictobject.c.html#1402"><span class="True">    1402:</span></a> <span class="b">PyDict_GetItem</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="1403" /><a href="dictobject.c.html#1403"><span class="True">    1403:</span></a> <span class="f">{</span>
<a name="1404" /><a href="dictobject.c.html#1404"><span class="True">    1404:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="1405" /><a href="dictobject.c.html#1405"><span class="True">    1405:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="1406" /><a href="dictobject.c.html#1406"><span class="True">    1406:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="1407" /><a href="dictobject.c.html#1407"><span class="True">    1407:</span></a>     <span class="b">PyThreadState</span> <span class="f">*</span><span class="b">tstate</span><span class="f">;</span>
<a name="1408" /><a href="dictobject.c.html#1408"><span class="True">    1408:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1409" /><span class="True">    1409:</span> 
<a name="1410" /><a href="dictobject.c.html#1410"><span class="True">    1410:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span>
<a name="1411" /><a href="dictobject.c.html#1411"><span class="True">    1411:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1412" /><a href="dictobject.c.html#1412"><span class="True">    1412:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="1413" /><a href="dictobject.c.html#1413"><span class="True">    1413:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1414" /><a href="dictobject.c.html#1414"><span class="True">    1414:</span></a>     <span class="f">{</span>
<a name="1415" /><a href="dictobject.c.html#1415"><span class="True">    1415:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1416" /><a href="dictobject.c.html#1416"><span class="True">    1416:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="1417" /><a href="dictobject.c.html#1417"><span class="True">    1417:</span></a>             <span class="b">PyErr_Clear</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1418" /><a href="dictobject.c.html#1418"><span class="True">    1418:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1419" /><a href="dictobject.c.html#1419"><span class="True">    1419:</span></a>         <span class="f">}</span>
<a name="1420" /><a href="dictobject.c.html#1420"><span class="True">    1420:</span></a>     <span class="f">}</span>
<a name="1421" /><span class="True">    1421:</span> 
<a name="1422" /><span class="True">    1422:</span>     <span class="k">/* We can arrive here with a NULL tstate during initialization: try</span>
<a name="1423" /><span class="True">    1423:</span> <span class="k">       running &quot;python -Wi&quot; for an example related to string interning.</span>
<a name="1424" /><span class="True">    1424:</span> <span class="k">       Let&apos;s just hope that no exception occurs then...  This must be</span>
<a name="1425" /><span class="True">    1425:</span> <span class="k">       _PyThreadState_Current and not PyThreadState_GET() because in debug</span>
<a name="1426" /><span class="True">    1426:</span> <span class="k">       mode, the latter complains if tstate is NULL. */</span>
<a name="1427" /><a href="dictobject.c.html#1427"><span class="True">    1427:</span></a>     <span class="b">tstate</span> <span class="f">=</span> <span class="b">_PyThreadState_UncheckedGet</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1428" /><a href="dictobject.c.html#1428"><span class="True">    1428:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">tstate</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <span class="b">tstate</span><span class="f">-&gt;</span><span class="b">curexc_type</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1429" /><span class="True">    1429:</span>         <span class="k">/* preserve the existing exception */</span>
<a name="1430" /><a href="dictobject.c.html#1430"><span class="True">    1430:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">err_type</span><span class="f">,</span> <span class="f">*</span><span class="b">err_value</span><span class="f">,</span> <span class="f">*</span><span class="b">err_tb</span><span class="f">;</span>
<a name="1431" /><a href="dictobject.c.html#1431"><span class="True">    1431:</span></a>         <span class="b">PyErr_Fetch</span><span class="f">(</span><span class="f">&amp;</span><span class="b">err_type</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">err_value</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">err_tb</span><span class="f">)</span><span class="f">;</span>
<a name="1432" /><a href="dictobject.c.html#1432"><span class="True">    1432:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1433" /><span class="True">    1433:</span>         <span class="k">/* ignore errors */</span>
<a name="1434" /><a href="dictobject.c.html#1434"><span class="True">    1434:</span></a>         <span class="b">PyErr_Restore</span><span class="f">(</span><span class="b">err_type</span><span class="f">,</span> <span class="b">err_value</span><span class="f">,</span> <span class="b">err_tb</span><span class="f">)</span><span class="f">;</span>
<a name="1435" /><a href="dictobject.c.html#1435"><span class="True">    1435:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1436" /><a href="dictobject.c.html#1436"><span class="True">    1436:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1437" /><a href="dictobject.c.html#1437"><span class="True">    1437:</span></a>     <span class="f">}</span>
<a name="1438" /><a href="dictobject.c.html#1438"><span class="True">    1438:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="1439" /><a href="dictobject.c.html#1439"><span class="True">    1439:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1440" /><a href="dictobject.c.html#1440"><span class="True">    1440:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="1441" /><a href="dictobject.c.html#1441"><span class="True">    1441:</span></a>             <span class="b">PyErr_Clear</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1442" /><a href="dictobject.c.html#1442"><span class="True">    1442:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1443" /><a href="dictobject.c.html#1443"><span class="True">    1443:</span></a>         <span class="f">}</span>
<a name="1444" /><a href="dictobject.c.html#1444"><span class="True">    1444:</span></a>     <span class="f">}</span>
<a name="1445" /><a href="dictobject.c.html#1445"><span class="True">    1445:</span></a>     <span class="m">return</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1446" /><a href="dictobject.c.html#1446"><span class="True">    1446:</span></a> <span class="f">}</span>
<a name="1447" /><span class="True">    1447:</span> 
<a name="1448" /><span class="True">    1448:</span> <span class="k">/* Same as PyDict_GetItemWithError() but with hash supplied by caller.</span>
<a name="1449" /><span class="True">    1449:</span> <span class="k">   This returns NULL *with* an exception set if an exception occurred.</span>
<a name="1450" /><span class="True">    1450:</span> <span class="k">   It returns NULL *without* an exception set if the key wasn&apos;t present.</span>
<a name="1451" /><span class="True">    1451:</span> <span class="k">*/</span>
<a name="1452" /><a href="dictobject.c.html#1452"><span class="True">    1452:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="1453" /><a href="dictobject.c.html#1453"><span class="True">    1453:</span></a> <span class="b">_PyDict_GetItem_KnownHash</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">)</span>
<a name="1454" /><a href="dictobject.c.html#1454"><span class="True">    1454:</span></a> <span class="f">{</span>
<a name="1455" /><a href="dictobject.c.html#1455"><span class="True">    1455:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="1456" /><a href="dictobject.c.html#1456"><span class="True">    1456:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="1457" /><a href="dictobject.c.html#1457"><span class="True">    1457:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1458" /><span class="True">    1458:</span> 
<a name="1459" /><a href="dictobject.c.html#1459"><span class="True">    1459:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1460" /><a href="dictobject.c.html#1460"><span class="True">    1460:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1461" /><a href="dictobject.c.html#1461"><span class="True">    1461:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1462" /><a href="dictobject.c.html#1462"><span class="True">    1462:</span></a>     <span class="f">}</span>
<a name="1463" /><span class="True">    1463:</span> 
<a name="1464" /><a href="dictobject.c.html#1464"><span class="True">    1464:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1465" /><a href="dictobject.c.html#1465"><span class="True">    1465:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="1466" /><a href="dictobject.c.html#1466"><span class="True">    1466:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1467" /><a href="dictobject.c.html#1467"><span class="True">    1467:</span></a>     <span class="f">}</span>
<a name="1468" /><a href="dictobject.c.html#1468"><span class="True">    1468:</span></a>     <span class="m">return</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1469" /><a href="dictobject.c.html#1469"><span class="True">    1469:</span></a> <span class="f">}</span>
<a name="1470" /><span class="True">    1470:</span> 
<a name="1471" /><span class="True">    1471:</span> <span class="k">/* Variant of PyDict_GetItem() that doesn&apos;t suppress exceptions.</span>
<a name="1472" /><span class="True">    1472:</span> <span class="k">   This returns NULL *with* an exception set if an exception occurred.</span>
<a name="1473" /><span class="True">    1473:</span> <span class="k">   It returns NULL *without* an exception set if the key wasn&apos;t present.</span>
<a name="1474" /><span class="True">    1474:</span> <span class="k">*/</span>
<a name="1475" /><a href="dictobject.c.html#1475"><span class="True">    1475:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="1476" /><a href="dictobject.c.html#1476"><span class="True">    1476:</span></a> <span class="b">PyDict_GetItemWithError</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="1477" /><a href="dictobject.c.html#1477"><span class="True">    1477:</span></a> <span class="f">{</span>
<a name="1478" /><a href="dictobject.c.html#1478"><span class="True">    1478:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="1479" /><a href="dictobject.c.html#1479"><span class="True">    1479:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="1480" /><a href="dictobject.c.html#1480"><span class="True">    1480:</span></a>     <span class="b">PyDictObject</span><span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="1481" /><a href="dictobject.c.html#1481"><span class="True">    1481:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1482" /><span class="True">    1482:</span> 
<a name="1483" /><a href="dictobject.c.html#1483"><span class="True">    1483:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1484" /><a href="dictobject.c.html#1484"><span class="True">    1484:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1485" /><a href="dictobject.c.html#1485"><span class="True">    1485:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1486" /><a href="dictobject.c.html#1486"><span class="True">    1486:</span></a>     <span class="f">}</span>
<a name="1487" /><a href="dictobject.c.html#1487"><span class="True">    1487:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="1488" /><a href="dictobject.c.html#1488"><span class="True">    1488:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1489" /><a href="dictobject.c.html#1489"><span class="True">    1489:</span></a>     <span class="f">{</span>
<a name="1490" /><a href="dictobject.c.html#1490"><span class="True">    1490:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1491" /><a href="dictobject.c.html#1491"><span class="True">    1491:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="1492" /><a href="dictobject.c.html#1492"><span class="True">    1492:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1493" /><a href="dictobject.c.html#1493"><span class="True">    1493:</span></a>         <span class="f">}</span>
<a name="1494" /><a href="dictobject.c.html#1494"><span class="True">    1494:</span></a>     <span class="f">}</span>
<a name="1495" /><span class="True">    1495:</span> 
<a name="1496" /><a href="dictobject.c.html#1496"><span class="True">    1496:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1497" /><a href="dictobject.c.html#1497"><span class="True">    1497:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1498" /><a href="dictobject.c.html#1498"><span class="True">    1498:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1499" /><a href="dictobject.c.html#1499"><span class="True">    1499:</span></a>     <span class="m">return</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1500" /><a href="dictobject.c.html#1500"><span class="True">    1500:</span></a> <span class="f">}</span>
<a name="1501" /><span class="True">    1501:</span> 
<a name="1502" /><a href="dictobject.c.html#1502"><span class="True">    1502:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="1503" /><a href="dictobject.c.html#1503"><span class="True">    1503:</span></a> <span class="b">_PyDict_GetItemIdWithError</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">dp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">_Py_Identifier</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="1504" /><a href="dictobject.c.html#1504"><span class="True">    1504:</span></a> <span class="f">{</span>
<a name="1505" /><a href="dictobject.c.html#1505"><span class="True">    1505:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">kv</span><span class="f">;</span>
<a name="1506" /><a href="dictobject.c.html#1506"><span class="True">    1506:</span></a>     <span class="b">kv</span> <span class="f">=</span> <span class="b">_PyUnicode_FromId</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span> <span class="k">/* borrowed */</span>
<a name="1507" /><a href="dictobject.c.html#1507"><span class="True">    1507:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">kv</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="1508" /><a href="dictobject.c.html#1508"><span class="True">    1508:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1509" /><a href="dictobject.c.html#1509"><span class="True">    1509:</span></a>     <span class="m">return</span> <span class="b">PyDict_GetItemWithError</span><span class="f">(</span><span class="b">dp</span><span class="f">,</span> <span class="b">kv</span><span class="f">)</span><span class="f">;</span>
<a name="1510" /><a href="dictobject.c.html#1510"><span class="True">    1510:</span></a> <span class="f">}</span>
<a name="1511" /><span class="True">    1511:</span> 
<a name="1512" /><span class="True">    1512:</span> <span class="k">/* Fast version of global value lookup (LOAD_GLOBAL).</span>
<a name="1513" /><span class="True">    1513:</span> <span class="k"> * Lookup in globals, then builtins.</span>
<a name="1514" /><span class="True">    1514:</span> <span class="k"> *</span>
<a name="1515" /><span class="True">    1515:</span> <span class="k"> * Raise an exception and return NULL if an error occurred (ex: computing the</span>
<a name="1516" /><span class="True">    1516:</span> <span class="k"> * key hash failed, key comparison failed, ...). Return NULL if the key doesn&apos;t</span>
<a name="1517" /><span class="True">    1517:</span> <span class="k"> * exist. Return the value if the key exists.</span>
<a name="1518" /><span class="True">    1518:</span> <span class="k"> */</span>
<a name="1519" /><a href="dictobject.c.html#1519"><span class="True">    1519:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="1520" /><a href="dictobject.c.html#1520"><span class="True">    1520:</span></a> <span class="b">_PyDict_LoadGlobal</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">globals</span><span class="f">,</span> <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">builtins</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="1521" /><a href="dictobject.c.html#1521"><span class="True">    1521:</span></a> <span class="f">{</span>
<a name="1522" /><a href="dictobject.c.html#1522"><span class="True">    1522:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="1523" /><a href="dictobject.c.html#1523"><span class="True">    1523:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="1524" /><a href="dictobject.c.html#1524"><span class="True">    1524:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1525" /><span class="True">    1525:</span> 
<a name="1526" /><a href="dictobject.c.html#1526"><span class="True">    1526:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="1527" /><a href="dictobject.c.html#1527"><span class="True">    1527:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1528" /><a href="dictobject.c.html#1528"><span class="True">    1528:</span></a>     <span class="f">{</span>
<a name="1529" /><a href="dictobject.c.html#1529"><span class="True">    1529:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1530" /><a href="dictobject.c.html#1530"><span class="True">    1530:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1531" /><a href="dictobject.c.html#1531"><span class="True">    1531:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1532" /><a href="dictobject.c.html#1532"><span class="True">    1532:</span></a>     <span class="f">}</span>
<a name="1533" /><span class="True">    1533:</span> 
<a name="1534" /><span class="True">    1534:</span>     <span class="k">/* namespace 1: globals */</span>
<a name="1535" /><a href="dictobject.c.html#1535"><span class="True">    1535:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="b">globals</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">(</span><span class="b">globals</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1536" /><a href="dictobject.c.html#1536"><span class="True">    1536:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="1537" /><a href="dictobject.c.html#1537"><span class="True">    1537:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1538" /><a href="dictobject.c.html#1538"><span class="True">    1538:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">!=</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">&amp;&amp;</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="1539" /><a href="dictobject.c.html#1539"><span class="True">    1539:</span></a>         <span class="m">return</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1540" /><span class="True">    1540:</span> 
<a name="1541" /><span class="True">    1541:</span>     <span class="k">/* namespace 2: builtins */</span>
<a name="1542" /><a href="dictobject.c.html#1542"><span class="True">    1542:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="b">builtins</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">(</span><span class="b">builtins</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1543" /><a href="dictobject.c.html#1543"><span class="True">    1543:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1544" /><a href="dictobject.c.html#1544"><span class="True">    1544:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1545" /><a href="dictobject.c.html#1545"><span class="True">    1545:</span></a>     <span class="m">return</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1546" /><a href="dictobject.c.html#1546"><span class="True">    1546:</span></a> <span class="f">}</span>
<a name="1547" /><span class="True">    1547:</span> 
<a name="1548" /><span class="True">    1548:</span> <span class="k">/* CAUTION: PyDict_SetItem() must guarantee that it won&apos;t resize the</span>
<a name="1549" /><span class="True">    1549:</span> <span class="k"> * dictionary if it&apos;s merely replacing the value for an existing key.</span>
<a name="1550" /><span class="True">    1550:</span> <span class="k"> * This means that it&apos;s safe to loop over a dictionary with PyDict_Next()</span>
<a name="1551" /><span class="True">    1551:</span> <span class="k"> * and occasionally replace a value -- but you can&apos;t insert new keys or</span>
<a name="1552" /><span class="True">    1552:</span> <span class="k"> * remove them.</span>
<a name="1553" /><span class="True">    1553:</span> <span class="k"> */</span>
<a name="1554" /><a href="dictobject.c.html#1554"><span class="True">    1554:</span></a> <span class="m">int</span>
<a name="1555" /><a href="dictobject.c.html#1555"><span class="True">    1555:</span></a> <span class="b">PyDict_SetItem</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">)</span>
<a name="1556" /><a href="dictobject.c.html#1556"><span class="True">    1556:</span></a> <span class="f">{</span>
<a name="1557" /><a href="dictobject.c.html#1557"><span class="True">    1557:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="1558" /><a href="dictobject.c.html#1558"><span class="True">    1558:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="1559" /><a href="dictobject.c.html#1559"><span class="True">    1559:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1560" /><a href="dictobject.c.html#1560"><span class="True">    1560:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1561" /><a href="dictobject.c.html#1561"><span class="True">    1561:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1562" /><a href="dictobject.c.html#1562"><span class="True">    1562:</span></a>     <span class="f">}</span>
<a name="1563" /><a href="dictobject.c.html#1563"><span class="True">    1563:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1564" /><a href="dictobject.c.html#1564"><span class="True">    1564:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="1565" /><a href="dictobject.c.html#1565"><span class="True">    1565:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="1566" /><a href="dictobject.c.html#1566"><span class="True">    1566:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="1567" /><a href="dictobject.c.html#1567"><span class="True">    1567:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1568" /><a href="dictobject.c.html#1568"><span class="True">    1568:</span></a>     <span class="f">{</span>
<a name="1569" /><a href="dictobject.c.html#1569"><span class="True">    1569:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1570" /><a href="dictobject.c.html#1570"><span class="True">    1570:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1571" /><a href="dictobject.c.html#1571"><span class="True">    1571:</span></a>             <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1572" /><a href="dictobject.c.html#1572"><span class="True">    1572:</span></a>     <span class="f">}</span>
<a name="1573" /><span class="True">    1573:</span> 
<a name="1574" /><span class="True">    1574:</span>     <span class="k">/* insertdict() handles any resizing that might be necessary */</span>
<a name="1575" /><a href="dictobject.c.html#1575"><span class="True">    1575:</span></a>     <span class="m">return</span> <span class="b">insertdict</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="1576" /><a href="dictobject.c.html#1576"><span class="True">    1576:</span></a> <span class="f">}</span>
<a name="1577" /><span class="True">    1577:</span> 
<a name="1578" /><a href="dictobject.c.html#1578"><span class="True">    1578:</span></a> <span class="m">int</span>
<a name="1579" /><a href="dictobject.c.html#1579"><span class="True">    1579:</span></a> <span class="b">_PyDict_SetItem_KnownHash</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">,</span>
<a name="1580" /><a href="dictobject.c.html#1580"><span class="True">    1580:</span></a>                          <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">)</span>
<a name="1581" /><a href="dictobject.c.html#1581"><span class="True">    1581:</span></a> <span class="f">{</span>
<a name="1582" /><a href="dictobject.c.html#1582"><span class="True">    1582:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="1583" /><span class="True">    1583:</span> 
<a name="1584" /><a href="dictobject.c.html#1584"><span class="True">    1584:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1585" /><a href="dictobject.c.html#1585"><span class="True">    1585:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1586" /><a href="dictobject.c.html#1586"><span class="True">    1586:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1587" /><a href="dictobject.c.html#1587"><span class="True">    1587:</span></a>     <span class="f">}</span>
<a name="1588" /><a href="dictobject.c.html#1588"><span class="True">    1588:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1589" /><a href="dictobject.c.html#1589"><span class="True">    1589:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="1590" /><a href="dictobject.c.html#1590"><span class="True">    1590:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">hash</span> <span class="f">!=</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="1591" /><a href="dictobject.c.html#1591"><span class="True">    1591:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="1592" /><span class="True">    1592:</span> 
<a name="1593" /><span class="True">    1593:</span>     <span class="k">/* insertdict() handles any resizing that might be necessary */</span>
<a name="1594" /><a href="dictobject.c.html#1594"><span class="True">    1594:</span></a>     <span class="m">return</span> <span class="b">insertdict</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="1595" /><a href="dictobject.c.html#1595"><span class="True">    1595:</span></a> <span class="f">}</span>
<a name="1596" /><span class="True">    1596:</span> 
<a name="1597" /><a href="dictobject.c.html#1597"><span class="True">    1597:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="1598" /><a href="dictobject.c.html#1598"><span class="True">    1598:</span></a> <span class="b">delitem_common</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="b">hashpos</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">,</span>
<a name="1599" /><a href="dictobject.c.html#1599"><span class="True">    1599:</span></a>                <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">)</span>
<a name="1600" /><a href="dictobject.c.html#1600"><span class="True">    1600:</span></a> <span class="f">{</span>
<a name="1601" /><a href="dictobject.c.html#1601"><span class="True">    1601:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">old_key</span><span class="f">,</span> <span class="f">*</span><span class="b">old_value</span><span class="f">;</span>
<a name="1602" /><a href="dictobject.c.html#1602"><span class="True">    1602:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">;</span>
<a name="1603" /><span class="True">    1603:</span> 
<a name="1604" /><a href="dictobject.c.html#1604"><span class="True">    1604:</span></a>     <span class="b">old_value</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1605" /><a href="dictobject.c.html#1605"><span class="True">    1605:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">old_value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1606" /><a href="dictobject.c.html#1606"><span class="True">    1606:</span></a>     <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1607" /><a href="dictobject.c.html#1607"><span class="True">    1607:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">--</span><span class="f">;</span>
<a name="1608" /><a href="dictobject.c.html#1608"><span class="True">    1608:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1609" /><a href="dictobject.c.html#1609"><span class="True">    1609:</span></a>     <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="1610" /><a href="dictobject.c.html#1610"><span class="True">    1610:</span></a>     <span class="b">dk_set_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">,</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span><span class="f">;</span>
<a name="1611" /><a href="dictobject.c.html#1611"><span class="True">    1611:</span></a>     <a href="macros_ref.html#_RU5TVVJFX0FMTE9XU19ERUxFVElPTlNfMA__"><span class="b">ENSURE_ALLOWS_DELETIONS</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="1612" /><a href="dictobject.c.html#1612"><span class="True">    1612:</span></a>     <span class="b">old_key</span> <span class="f">=</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="1613" /><a href="dictobject.c.html#1613"><span class="True">    1613:</span></a>     <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1614" /><a href="dictobject.c.html#1614"><span class="True">    1614:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">old_key</span><span class="f">)</span><span class="f">;</span>
<a name="1615" /><a href="dictobject.c.html#1615"><span class="True">    1615:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">old_value</span><span class="f">)</span><span class="f">;</span>
<a name="1616" /><span class="True">    1616:</span> 
<a name="1617" /><a href="dictobject.c.html#1617"><span class="True">    1617:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1618" /><a href="dictobject.c.html#1618"><span class="True">    1618:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1619" /><a href="dictobject.c.html#1619"><span class="True">    1619:</span></a> <span class="f">}</span>
<a name="1620" /><span class="True">    1620:</span> 
<a name="1621" /><a href="dictobject.c.html#1621"><span class="True">    1621:</span></a> <span class="m">int</span>
<a name="1622" /><a href="dictobject.c.html#1622"><span class="True">    1622:</span></a> <span class="b">PyDict_DelItem</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="1623" /><a href="dictobject.c.html#1623"><span class="True">    1623:</span></a> <span class="f">{</span>
<a name="1624" /><a href="dictobject.c.html#1624"><span class="True">    1624:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="1625" /><a href="dictobject.c.html#1625"><span class="True">    1625:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1626" /><a href="dictobject.c.html#1626"><span class="True">    1626:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="1627" /><a href="dictobject.c.html#1627"><span class="True">    1627:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="1628" /><a href="dictobject.c.html#1628"><span class="True">    1628:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1629" /><a href="dictobject.c.html#1629"><span class="True">    1629:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1630" /><a href="dictobject.c.html#1630"><span class="True">    1630:</span></a>             <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1631" /><a href="dictobject.c.html#1631"><span class="True">    1631:</span></a>     <span class="f">}</span>
<a name="1632" /><span class="True">    1632:</span> 
<a name="1633" /><a href="dictobject.c.html#1633"><span class="True">    1633:</span></a>     <span class="m">return</span> <span class="b">_PyDict_DelItem_KnownHash</span><span class="f">(</span><span class="b">op</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">)</span><span class="f">;</span>
<a name="1634" /><a href="dictobject.c.html#1634"><span class="True">    1634:</span></a> <span class="f">}</span>
<a name="1635" /><span class="True">    1635:</span> 
<a name="1636" /><a href="dictobject.c.html#1636"><span class="True">    1636:</span></a> <span class="m">int</span>
<a name="1637" /><a href="dictobject.c.html#1637"><span class="True">    1637:</span></a> <span class="b">_PyDict_DelItem_KnownHash</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">)</span>
<a name="1638" /><a href="dictobject.c.html#1638"><span class="True">    1638:</span></a> <span class="f">{</span>
<a name="1639" /><a href="dictobject.c.html#1639"><span class="True">    1639:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">hashpos</span><span class="f">,</span> <span class="b">ix</span><span class="f">;</span>
<a name="1640" /><a href="dictobject.c.html#1640"><span class="True">    1640:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="1641" /><a href="dictobject.c.html#1641"><span class="True">    1641:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1642" /><span class="True">    1642:</span> 
<a name="1643" /><a href="dictobject.c.html#1643"><span class="True">    1643:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1644" /><a href="dictobject.c.html#1644"><span class="True">    1644:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1645" /><a href="dictobject.c.html#1645"><span class="True">    1645:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1646" /><a href="dictobject.c.html#1646"><span class="True">    1646:</span></a>     <span class="f">}</span>
<a name="1647" /><a href="dictobject.c.html#1647"><span class="True">    1647:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1648" /><a href="dictobject.c.html#1648"><span class="True">    1648:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">hash</span> <span class="f">!=</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="1649" /><a href="dictobject.c.html#1649"><span class="True">    1649:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="1650" /><a href="dictobject.c.html#1650"><span class="True">    1650:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="1651" /><a href="dictobject.c.html#1651"><span class="True">    1651:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="1652" /><a href="dictobject.c.html#1652"><span class="True">    1652:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1653" /><a href="dictobject.c.html#1653"><span class="True">    1653:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">||</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1654" /><a href="dictobject.c.html#1654"><span class="True">    1654:</span></a>         <span class="b">_PyErr_SetKeyError</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1655" /><a href="dictobject.c.html#1655"><span class="True">    1655:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1656" /><a href="dictobject.c.html#1656"><span class="True">    1656:</span></a>     <span class="f">}</span>
<a name="1657" /><a href="dictobject.c.html#1657"><span class="True">    1657:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">)</span> <span class="f">==</span> <span class="b">ix</span><span class="f">)</span><span class="f">;</span>
<a name="1658" /><span class="True">    1658:</span> 
<a name="1659" /><span class="True">    1659:</span>     <span class="l">// Split table doesn&apos;t allow deletion.  Combine it.</span>
<a name="1660" /><a href="dictobject.c.html#1660"><span class="True">    1660:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1661" /><a href="dictobject.c.html#1661"><span class="True">    1661:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">dictresize</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1662" /><a href="dictobject.c.html#1662"><span class="True">    1662:</span></a>             <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1663" /><a href="dictobject.c.html#1663"><span class="True">    1663:</span></a>         <span class="f">}</span>
<a name="1664" /><a href="dictobject.c.html#1664"><span class="True">    1664:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="1665" /><a href="dictobject.c.html#1665"><span class="True">    1665:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="1666" /><a href="dictobject.c.html#1666"><span class="True">    1666:</span></a>     <span class="f">}</span>
<a name="1667" /><a href="dictobject.c.html#1667"><span class="True">    1667:</span></a>     <span class="m">return</span> <span class="b">delitem_common</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">,</span> <span class="b">ix</span><span class="f">,</span> <span class="b">value_addr</span><span class="f">)</span><span class="f">;</span>
<a name="1668" /><a href="dictobject.c.html#1668"><span class="True">    1668:</span></a> <span class="f">}</span>
<a name="1669" /><span class="True">    1669:</span> 
<a name="1670" /><span class="True">    1670:</span> <span class="k">/* This function promises that the predicate -&gt; deletion sequence is atomic</span>
<a name="1671" /><span class="True">    1671:</span> <span class="k"> * (i.e. protected by the GIL), assuming the predicate itself doesn&apos;t</span>
<a name="1672" /><span class="True">    1672:</span> <span class="k"> * release the GIL.</span>
<a name="1673" /><span class="True">    1673:</span> <span class="k"> */</span>
<a name="1674" /><a href="dictobject.c.html#1674"><span class="True">    1674:</span></a> <span class="m">int</span>
<a name="1675" /><a href="dictobject.c.html#1675"><span class="True">    1675:</span></a> <span class="b">_PyDict_DelItemIf</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span>
<a name="1676" /><a href="dictobject.c.html#1676"><span class="True">    1676:</span></a>                   <span class="m">int</span> <span class="f">(</span><span class="f">*</span><span class="b">predicate</span><span class="f">)</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">)</span><span class="f">)</span>
<a name="1677" /><a href="dictobject.c.html#1677"><span class="True">    1677:</span></a> <span class="f">{</span>
<a name="1678" /><a href="dictobject.c.html#1678"><span class="True">    1678:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">hashpos</span><span class="f">,</span> <span class="b">ix</span><span class="f">;</span>
<a name="1679" /><a href="dictobject.c.html#1679"><span class="True">    1679:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="1680" /><a href="dictobject.c.html#1680"><span class="True">    1680:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="1681" /><a href="dictobject.c.html#1681"><span class="True">    1681:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1682" /><a href="dictobject.c.html#1682"><span class="True">    1682:</span></a>     <span class="m">int</span> <span class="b">res</span><span class="f">;</span>
<a name="1683" /><span class="True">    1683:</span> 
<a name="1684" /><a href="dictobject.c.html#1684"><span class="True">    1684:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1685" /><a href="dictobject.c.html#1685"><span class="True">    1685:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1686" /><a href="dictobject.c.html#1686"><span class="True">    1686:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1687" /><a href="dictobject.c.html#1687"><span class="True">    1687:</span></a>     <span class="f">}</span>
<a name="1688" /><a href="dictobject.c.html#1688"><span class="True">    1688:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1689" /><a href="dictobject.c.html#1689"><span class="True">    1689:</span></a>     <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1690" /><a href="dictobject.c.html#1690"><span class="True">    1690:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1691" /><a href="dictobject.c.html#1691"><span class="True">    1691:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1692" /><a href="dictobject.c.html#1692"><span class="True">    1692:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="1693" /><a href="dictobject.c.html#1693"><span class="True">    1693:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="1694" /><a href="dictobject.c.html#1694"><span class="True">    1694:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="1695" /><a href="dictobject.c.html#1695"><span class="True">    1695:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1696" /><a href="dictobject.c.html#1696"><span class="True">    1696:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">||</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1697" /><a href="dictobject.c.html#1697"><span class="True">    1697:</span></a>         <span class="b">_PyErr_SetKeyError</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1698" /><a href="dictobject.c.html#1698"><span class="True">    1698:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1699" /><a href="dictobject.c.html#1699"><span class="True">    1699:</span></a>     <span class="f">}</span>
<a name="1700" /><a href="dictobject.c.html#1700"><span class="True">    1700:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">)</span> <span class="f">==</span> <span class="b">ix</span><span class="f">)</span><span class="f">;</span>
<a name="1701" /><span class="True">    1701:</span> 
<a name="1702" /><span class="True">    1702:</span>     <span class="l">// Split table doesn&apos;t allow deletion.  Combine it.</span>
<a name="1703" /><a href="dictobject.c.html#1703"><span class="True">    1703:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1704" /><a href="dictobject.c.html#1704"><span class="True">    1704:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">dictresize</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1705" /><a href="dictobject.c.html#1705"><span class="True">    1705:</span></a>             <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1706" /><a href="dictobject.c.html#1706"><span class="True">    1706:</span></a>         <span class="f">}</span>
<a name="1707" /><a href="dictobject.c.html#1707"><span class="True">    1707:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="1708" /><a href="dictobject.c.html#1708"><span class="True">    1708:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="1709" /><a href="dictobject.c.html#1709"><span class="True">    1709:</span></a>     <span class="f">}</span>
<a name="1710" /><span class="True">    1710:</span> 
<a name="1711" /><a href="dictobject.c.html#1711"><span class="True">    1711:</span></a>     <span class="b">res</span> <span class="f">=</span> <span class="b">predicate</span><span class="f">(</span><span class="f">*</span><span class="b">value_addr</span><span class="f">)</span><span class="f">;</span>
<a name="1712" /><a href="dictobject.c.html#1712"><span class="True">    1712:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">res</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1713" /><a href="dictobject.c.html#1713"><span class="True">    1713:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="1714" /><a href="dictobject.c.html#1714"><span class="True">    1714:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">res</span> <span class="f">&gt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1715" /><a href="dictobject.c.html#1715"><span class="True">    1715:</span></a>         <span class="m">return</span> <span class="b">delitem_common</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">,</span> <span class="b">ix</span><span class="f">,</span> <span class="b">value_addr</span><span class="f">)</span><span class="f">;</span>
<a name="1716" /><a href="dictobject.c.html#1716"><span class="True">    1716:</span></a>     <span class="m">else</span>
<a name="1717" /><a href="dictobject.c.html#1717"><span class="True">    1717:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1718" /><a href="dictobject.c.html#1718"><span class="True">    1718:</span></a> <span class="f">}</span>
<a name="1719" /><span class="True">    1719:</span> 
<a name="1720" /><span class="True">    1720:</span> 
<a name="1721" /><a href="dictobject.c.html#1721"><span class="True">    1721:</span></a> <span class="m">void</span>
<a name="1722" /><a href="dictobject.c.html#1722"><span class="True">    1722:</span></a> <span class="b">PyDict_Clear</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">)</span>
<a name="1723" /><a href="dictobject.c.html#1723"><span class="True">    1723:</span></a> <span class="f">{</span>
<a name="1724" /><a href="dictobject.c.html#1724"><span class="True">    1724:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="1725" /><a href="dictobject.c.html#1725"><span class="True">    1725:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">oldkeys</span><span class="f">;</span>
<a name="1726" /><a href="dictobject.c.html#1726"><span class="True">    1726:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">oldvalues</span><span class="f">;</span>
<a name="1727" /><a href="dictobject.c.html#1727"><span class="True">    1727:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="1728" /><span class="True">    1728:</span> 
<a name="1729" /><a href="dictobject.c.html#1729"><span class="True">    1729:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span>
<a name="1730" /><a href="dictobject.c.html#1730"><span class="True">    1730:</span></a>         <span class="m">return</span><span class="f">;</span>
<a name="1731" /><a href="dictobject.c.html#1731"><span class="True">    1731:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">)</span><span class="f">;</span>
<a name="1732" /><a href="dictobject.c.html#1732"><span class="True">    1732:</span></a>     <span class="b">oldkeys</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="1733" /><a href="dictobject.c.html#1733"><span class="True">    1733:</span></a>     <span class="b">oldvalues</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">;</span>
<a name="1734" /><a href="dictobject.c.html#1734"><span class="True">    1734:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">oldvalues</span> <span class="f">==</span> <span class="b">empty_values</span><span class="f">)</span>
<a name="1735" /><a href="dictobject.c.html#1735"><span class="True">    1735:</span></a>         <span class="m">return</span><span class="f">;</span>
<a name="1736" /><span class="True">    1736:</span>     <span class="k">/* Empty the dict... */</span>
<a name="1737" /><a href="dictobject.c.html#1737"><span class="True">    1737:</span></a>     <a href="macros_ref.html#_REtfSU5DUkVGXzA_"><span class="b">DK_INCREF</span></a><span class="f">(</span><a href="macros_ref.html#_UHlfRU1QVFlfS0VZU18w"><span class="b">Py_EMPTY_KEYS</span></a><span class="f">)</span><span class="f">;</span>
<a name="1738" /><a href="dictobject.c.html#1738"><span class="True">    1738:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">=</span> <a href="macros_ref.html#_UHlfRU1QVFlfS0VZU18w"><span class="b">Py_EMPTY_KEYS</span></a><span class="f">;</span>
<a name="1739" /><a href="dictobject.c.html#1739"><span class="True">    1739:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">=</span> <span class="b">empty_values</span><span class="f">;</span>
<a name="1740" /><a href="dictobject.c.html#1740"><span class="True">    1740:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="1741" /><a href="dictobject.c.html#1741"><span class="True">    1741:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1742" /><span class="True">    1742:</span>     <span class="k">/* ...then clear the keys and values */</span>
<a name="1743" /><a href="dictobject.c.html#1743"><span class="True">    1743:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">oldvalues</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1744" /><a href="dictobject.c.html#1744"><span class="True">    1744:</span></a>         <span class="b">n</span> <span class="f">=</span> <span class="b">oldkeys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="1745" /><a href="dictobject.c.html#1745"><span class="True">    1745:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span>
<a name="1746" /><a href="dictobject.c.html#1746"><span class="True">    1746:</span></a>             <a href="macros_ref.html#_UHlfQ0xFQVJfMA__"><span class="b">Py_CLEAR</span></a><span class="f">(</span><span class="b">oldvalues</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">)</span><span class="f">;</span>
<a name="1747" /><a href="dictobject.c.html#1747"><span class="True">    1747:</span></a>         <a href="macros_ref.html#_ZnJlZV92YWx1ZXNfMA__"><span class="b">free_values</span></a><span class="f">(</span><span class="b">oldvalues</span><span class="f">)</span><span class="f">;</span>
<a name="1748" /><a href="dictobject.c.html#1748"><span class="True">    1748:</span></a>         <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">oldkeys</span><span class="f">)</span><span class="f">;</span>
<a name="1749" /><a href="dictobject.c.html#1749"><span class="True">    1749:</span></a>     <span class="f">}</span>
<a name="1750" /><a href="dictobject.c.html#1750"><span class="True">    1750:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="1751" /><a href="dictobject.c.html#1751"><span class="True">    1751:</span></a>        <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">oldkeys</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="1752" /><a href="dictobject.c.html#1752"><span class="True">    1752:</span></a>        <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">oldkeys</span><span class="f">)</span><span class="f">;</span>
<a name="1753" /><a href="dictobject.c.html#1753"><span class="True">    1753:</span></a>     <span class="f">}</span>
<a name="1754" /><a href="dictobject.c.html#1754"><span class="True">    1754:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1755" /><a href="dictobject.c.html#1755"><span class="True">    1755:</span></a> <span class="f">}</span>
<a name="1756" /><span class="True">    1756:</span> 
<a name="1757" /><span class="True">    1757:</span> <span class="k">/* Internal version of PyDict_Next that returns a hash value in addition</span>
<a name="1758" /><span class="True">    1758:</span> <span class="k"> * to the key and value.</span>
<a name="1759" /><span class="True">    1759:</span> <span class="k"> * Return 1 on success, return 0 when the reached the end of the dictionary</span>
<a name="1760" /><span class="True">    1760:</span> <span class="k"> * (or if op is not a dictionary)</span>
<a name="1761" /><span class="True">    1761:</span> <span class="k"> */</span>
<a name="1762" /><a href="dictobject.c.html#1762"><span class="True">    1762:</span></a> <span class="m">int</span>
<a name="1763" /><a href="dictobject.c.html#1763"><span class="True">    1763:</span></a> <span class="b">_PyDict_Next</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">pkey</span><span class="f">,</span>
<a name="1764" /><a href="dictobject.c.html#1764"><span class="True">    1764:</span></a>              <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">pvalue</span><span class="f">,</span> <span class="b">Py_hash_t</span> <span class="f">*</span><span class="b">phash</span><span class="f">)</span>
<a name="1765" /><a href="dictobject.c.html#1765"><span class="True">    1765:</span></a> <span class="f">{</span>
<a name="1766" /><a href="dictobject.c.html#1766"><span class="True">    1766:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="1767" /><a href="dictobject.c.html#1767"><span class="True">    1767:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="1768" /><a href="dictobject.c.html#1768"><span class="True">    1768:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">entry_ptr</span><span class="f">;</span>
<a name="1769" /><a href="dictobject.c.html#1769"><span class="True">    1769:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">;</span>
<a name="1770" /><span class="True">    1770:</span> 
<a name="1771" /><a href="dictobject.c.html#1771"><span class="True">    1771:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">)</span>
<a name="1772" /><a href="dictobject.c.html#1772"><span class="True">    1772:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1773" /><a href="dictobject.c.html#1773"><span class="True">    1773:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="1774" /><a href="dictobject.c.html#1774"><span class="True">    1774:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="f">*</span><span class="b">ppos</span><span class="f">;</span>
<a name="1775" /><a href="dictobject.c.html#1775"><span class="True">    1775:</span></a>     <span class="b">n</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="1776" /><a href="dictobject.c.html#1776"><span class="True">    1776:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="b">size_t</span><span class="f">)</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="f">(</span><span class="b">size_t</span><span class="f">)</span><span class="b">n</span><span class="f">)</span>
<a name="1777" /><a href="dictobject.c.html#1777"><span class="True">    1777:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1778" /><a href="dictobject.c.html#1778"><span class="True">    1778:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span> <span class="f">{</span>
<a name="1779" /><a href="dictobject.c.html#1779"><span class="True">    1779:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="1780" /><a href="dictobject.c.html#1780"><span class="True">    1780:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span> <span class="f">&amp;&amp;</span> <span class="f">*</span><span class="b">value_ptr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1781" /><a href="dictobject.c.html#1781"><span class="True">    1781:</span></a>             <span class="b">value_ptr</span><span class="f">++</span><span class="f">;</span>
<a name="1782" /><a href="dictobject.c.html#1782"><span class="True">    1782:</span></a>             <span class="b">i</span><span class="f">++</span><span class="f">;</span>
<a name="1783" /><a href="dictobject.c.html#1783"><span class="True">    1783:</span></a>         <span class="f">}</span>
<a name="1784" /><a href="dictobject.c.html#1784"><span class="True">    1784:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="b">n</span><span class="f">)</span>
<a name="1785" /><a href="dictobject.c.html#1785"><span class="True">    1785:</span></a>             <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1786" /><a href="dictobject.c.html#1786"><span class="True">    1786:</span></a>         <span class="b">entry_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="1787" /><a href="dictobject.c.html#1787"><span class="True">    1787:</span></a>         <span class="b">value</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_ptr</span><span class="f">;</span>
<a name="1788" /><a href="dictobject.c.html#1788"><span class="True">    1788:</span></a>     <span class="f">}</span>
<a name="1789" /><a href="dictobject.c.html#1789"><span class="True">    1789:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="1790" /><a href="dictobject.c.html#1790"><span class="True">    1790:</span></a>         <span class="b">entry_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="1791" /><a href="dictobject.c.html#1791"><span class="True">    1791:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span> <span class="f">&amp;&amp;</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1792" /><a href="dictobject.c.html#1792"><span class="True">    1792:</span></a>             <span class="b">entry_ptr</span><span class="f">++</span><span class="f">;</span>
<a name="1793" /><a href="dictobject.c.html#1793"><span class="True">    1793:</span></a>             <span class="b">i</span><span class="f">++</span><span class="f">;</span>
<a name="1794" /><a href="dictobject.c.html#1794"><span class="True">    1794:</span></a>         <span class="f">}</span>
<a name="1795" /><a href="dictobject.c.html#1795"><span class="True">    1795:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="b">n</span><span class="f">)</span>
<a name="1796" /><a href="dictobject.c.html#1796"><span class="True">    1796:</span></a>             <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="1797" /><a href="dictobject.c.html#1797"><span class="True">    1797:</span></a>         <span class="b">value</span> <span class="f">=</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="1798" /><a href="dictobject.c.html#1798"><span class="True">    1798:</span></a>     <span class="f">}</span>
<a name="1799" /><a href="dictobject.c.html#1799"><span class="True">    1799:</span></a>     <span class="f">*</span><span class="b">ppos</span> <span class="f">=</span> <span class="b">i</span><span class="f">+</span><span class="c">1</span><span class="f">;</span>
<a name="1800" /><a href="dictobject.c.html#1800"><span class="True">    1800:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">pkey</span><span class="f">)</span>
<a name="1801" /><a href="dictobject.c.html#1801"><span class="True">    1801:</span></a>         <span class="f">*</span><span class="b">pkey</span> <span class="f">=</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="1802" /><a href="dictobject.c.html#1802"><span class="True">    1802:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">phash</span><span class="f">)</span>
<a name="1803" /><a href="dictobject.c.html#1803"><span class="True">    1803:</span></a>         <span class="f">*</span><span class="b">phash</span> <span class="f">=</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_hash</span><span class="f">;</span>
<a name="1804" /><a href="dictobject.c.html#1804"><span class="True">    1804:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">pvalue</span><span class="f">)</span>
<a name="1805" /><a href="dictobject.c.html#1805"><span class="True">    1805:</span></a>         <span class="f">*</span><span class="b">pvalue</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="1806" /><a href="dictobject.c.html#1806"><span class="True">    1806:</span></a>     <span class="m">return</span> <span class="c">1</span><span class="f">;</span>
<a name="1807" /><a href="dictobject.c.html#1807"><span class="True">    1807:</span></a> <span class="f">}</span>
<a name="1808" /><span class="True">    1808:</span> 
<a name="1809" /><span class="True">    1809:</span> <span class="k">/*</span>
<a name="1810" /><span class="True">    1810:</span> <span class="k"> * Iterate over a dict.  Use like so:</span>
<a name="1811" /><span class="True">    1811:</span> <span class="k"> *</span>
<a name="1812" /><span class="True">    1812:</span> <span class="k"> *     Py_ssize_t i;</span>
<a name="1813" /><span class="True">    1813:</span> <span class="k"> *     PyObject *key, *value;</span>
<a name="1814" /><span class="True">    1814:</span> <span class="k"> *     i = 0;   # important!  i should not otherwise be changed by you</span>
<a name="1815" /><span class="True">    1815:</span> <span class="k"> *     while (PyDict_Next(yourdict, &amp;i, &amp;key, &amp;value)) {</span>
<a name="1816" /><span class="True">    1816:</span> <span class="k"> *         Refer to borrowed references in key and value.</span>
<a name="1817" /><span class="True">    1817:</span> <span class="k"> *     }</span>
<a name="1818" /><span class="True">    1818:</span> <span class="k"> *</span>
<a name="1819" /><span class="True">    1819:</span> <span class="k"> * Return 1 on success, return 0 when the reached the end of the dictionary</span>
<a name="1820" /><span class="True">    1820:</span> <span class="k"> * (or if op is not a dictionary)</span>
<a name="1821" /><span class="True">    1821:</span> <span class="k"> *</span>
<a name="1822" /><span class="True">    1822:</span> <span class="k"> * CAUTION:  In general, it isn&apos;t safe to use PyDict_Next in a loop that</span>
<a name="1823" /><span class="True">    1823:</span> <span class="k"> * mutates the dict.  One exception:  it is safe if the loop merely changes</span>
<a name="1824" /><span class="True">    1824:</span> <span class="k"> * the values associated with the keys (but doesn&apos;t insert new keys or</span>
<a name="1825" /><span class="True">    1825:</span> <span class="k"> * delete keys), via PyDict_SetItem().</span>
<a name="1826" /><span class="True">    1826:</span> <span class="k"> */</span>
<a name="1827" /><a href="dictobject.c.html#1827"><span class="True">    1827:</span></a> <span class="m">int</span>
<a name="1828" /><a href="dictobject.c.html#1828"><span class="True">    1828:</span></a> <span class="b">PyDict_Next</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">Py_ssize_t</span> <span class="f">*</span><span class="b">ppos</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">pkey</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">pvalue</span><span class="f">)</span>
<a name="1829" /><a href="dictobject.c.html#1829"><span class="True">    1829:</span></a> <span class="f">{</span>
<a name="1830" /><a href="dictobject.c.html#1830"><span class="True">    1830:</span></a>     <span class="m">return</span> <span class="b">_PyDict_Next</span><span class="f">(</span><span class="b">op</span><span class="f">,</span> <span class="b">ppos</span><span class="f">,</span> <span class="b">pkey</span><span class="f">,</span> <span class="b">pvalue</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1831" /><a href="dictobject.c.html#1831"><span class="True">    1831:</span></a> <span class="f">}</span>
<a name="1832" /><span class="True">    1832:</span> 
<a name="1833" /><span class="True">    1833:</span> <span class="k">/* Internal version of dict.pop(). */</span>
<a name="1834" /><a href="dictobject.c.html#1834"><span class="True">    1834:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="1835" /><a href="dictobject.c.html#1835"><span class="True">    1835:</span></a> <span class="b">_PyDict_Pop_KnownHash</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">deflt</span><span class="f">)</span>
<a name="1836" /><a href="dictobject.c.html#1836"><span class="True">    1836:</span></a> <span class="f">{</span>
<a name="1837" /><a href="dictobject.c.html#1837"><span class="True">    1837:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">;</span>
<a name="1838" /><a href="dictobject.c.html#1838"><span class="True">    1838:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">old_value</span><span class="f">,</span> <span class="f">*</span><span class="b">old_key</span><span class="f">;</span>
<a name="1839" /><a href="dictobject.c.html#1839"><span class="True">    1839:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">;</span>
<a name="1840" /><a href="dictobject.c.html#1840"><span class="True">    1840:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1841" /><a href="dictobject.c.html#1841"><span class="True">    1841:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="1842" /><span class="True">    1842:</span> 
<a name="1843" /><a href="dictobject.c.html#1843"><span class="True">    1843:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">dict</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1844" /><a href="dictobject.c.html#1844"><span class="True">    1844:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dict</span><span class="f">;</span>
<a name="1845" /><span class="True">    1845:</span> 
<a name="1846" /><a href="dictobject.c.html#1846"><span class="True">    1846:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="1847" /><a href="dictobject.c.html#1847"><span class="True">    1847:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">deflt</span><span class="f">)</span> <span class="f">{</span>
<a name="1848" /><a href="dictobject.c.html#1848"><span class="True">    1848:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">deflt</span><span class="f">)</span><span class="f">;</span>
<a name="1849" /><a href="dictobject.c.html#1849"><span class="True">    1849:</span></a>             <span class="m">return</span> <span class="b">deflt</span><span class="f">;</span>
<a name="1850" /><a href="dictobject.c.html#1850"><span class="True">    1850:</span></a>         <span class="f">}</span>
<a name="1851" /><a href="dictobject.c.html#1851"><span class="True">    1851:</span></a>         <span class="b">_PyErr_SetKeyError</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1852" /><a href="dictobject.c.html#1852"><span class="True">    1852:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1853" /><a href="dictobject.c.html#1853"><span class="True">    1853:</span></a>     <span class="f">}</span>
<a name="1854" /><a href="dictobject.c.html#1854"><span class="True">    1854:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="1855" /><a href="dictobject.c.html#1855"><span class="True">    1855:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="1856" /><a href="dictobject.c.html#1856"><span class="True">    1856:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1857" /><a href="dictobject.c.html#1857"><span class="True">    1857:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">||</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1858" /><a href="dictobject.c.html#1858"><span class="True">    1858:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">deflt</span><span class="f">)</span> <span class="f">{</span>
<a name="1859" /><a href="dictobject.c.html#1859"><span class="True">    1859:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">deflt</span><span class="f">)</span><span class="f">;</span>
<a name="1860" /><a href="dictobject.c.html#1860"><span class="True">    1860:</span></a>             <span class="m">return</span> <span class="b">deflt</span><span class="f">;</span>
<a name="1861" /><a href="dictobject.c.html#1861"><span class="True">    1861:</span></a>         <span class="f">}</span>
<a name="1862" /><a href="dictobject.c.html#1862"><span class="True">    1862:</span></a>         <span class="b">_PyErr_SetKeyError</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1863" /><a href="dictobject.c.html#1863"><span class="True">    1863:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1864" /><a href="dictobject.c.html#1864"><span class="True">    1864:</span></a>     <span class="f">}</span>
<a name="1865" /><span class="True">    1865:</span> 
<a name="1866" /><span class="True">    1866:</span>     <span class="l">// Split table doesn&apos;t allow deletion.  Combine it.</span>
<a name="1867" /><a href="dictobject.c.html#1867"><span class="True">    1867:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1868" /><a href="dictobject.c.html#1868"><span class="True">    1868:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">dictresize</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1869" /><a href="dictobject.c.html#1869"><span class="True">    1869:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1870" /><a href="dictobject.c.html#1870"><span class="True">    1870:</span></a>         <span class="f">}</span>
<a name="1871" /><a href="dictobject.c.html#1871"><span class="True">    1871:</span></a>         <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="1872" /><a href="dictobject.c.html#1872"><span class="True">    1872:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="1873" /><a href="dictobject.c.html#1873"><span class="True">    1873:</span></a>     <span class="f">}</span>
<a name="1874" /><span class="True">    1874:</span> 
<a name="1875" /><a href="dictobject.c.html#1875"><span class="True">    1875:</span></a>     <span class="b">old_value</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="1876" /><a href="dictobject.c.html#1876"><span class="True">    1876:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">old_value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1877" /><a href="dictobject.c.html#1877"><span class="True">    1877:</span></a>     <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1878" /><a href="dictobject.c.html#1878"><span class="True">    1878:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">--</span><span class="f">;</span>
<a name="1879" /><a href="dictobject.c.html#1879"><span class="True">    1879:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="1880" /><a href="dictobject.c.html#1880"><span class="True">    1880:</span></a>     <span class="b">dk_set_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">,</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span><span class="f">;</span>
<a name="1881" /><a href="dictobject.c.html#1881"><span class="True">    1881:</span></a>     <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">[</span><span class="b">ix</span><span class="f">]</span><span class="f">;</span>
<a name="1882" /><a href="dictobject.c.html#1882"><span class="True">    1882:</span></a>     <a href="macros_ref.html#_RU5TVVJFX0FMTE9XU19ERUxFVElPTlNfMA__"><span class="b">ENSURE_ALLOWS_DELETIONS</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="1883" /><a href="dictobject.c.html#1883"><span class="True">    1883:</span></a>     <span class="b">old_key</span> <span class="f">=</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="1884" /><a href="dictobject.c.html#1884"><span class="True">    1884:</span></a>     <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1885" /><a href="dictobject.c.html#1885"><span class="True">    1885:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">old_key</span><span class="f">)</span><span class="f">;</span>
<a name="1886" /><span class="True">    1886:</span> 
<a name="1887" /><a href="dictobject.c.html#1887"><span class="True">    1887:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="1888" /><a href="dictobject.c.html#1888"><span class="True">    1888:</span></a>     <span class="m">return</span> <span class="b">old_value</span><span class="f">;</span>
<a name="1889" /><a href="dictobject.c.html#1889"><span class="True">    1889:</span></a> <span class="f">}</span>
<a name="1890" /><span class="True">    1890:</span> 
<a name="1891" /><a href="dictobject.c.html#1891"><span class="True">    1891:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="1892" /><a href="dictobject.c.html#1892"><span class="True">    1892:</span></a> <span class="b">_PyDict_Pop</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">deflt</span><span class="f">)</span>
<a name="1893" /><a href="dictobject.c.html#1893"><span class="True">    1893:</span></a> <span class="f">{</span>
<a name="1894" /><a href="dictobject.c.html#1894"><span class="True">    1894:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="1895" /><span class="True">    1895:</span> 
<a name="1896" /><a href="dictobject.c.html#1896"><span class="True">    1896:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dict</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="1897" /><a href="dictobject.c.html#1897"><span class="True">    1897:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">deflt</span><span class="f">)</span> <span class="f">{</span>
<a name="1898" /><a href="dictobject.c.html#1898"><span class="True">    1898:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">deflt</span><span class="f">)</span><span class="f">;</span>
<a name="1899" /><a href="dictobject.c.html#1899"><span class="True">    1899:</span></a>             <span class="m">return</span> <span class="b">deflt</span><span class="f">;</span>
<a name="1900" /><a href="dictobject.c.html#1900"><span class="True">    1900:</span></a>         <span class="f">}</span>
<a name="1901" /><a href="dictobject.c.html#1901"><span class="True">    1901:</span></a>         <span class="b">_PyErr_SetKeyError</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1902" /><a href="dictobject.c.html#1902"><span class="True">    1902:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1903" /><a href="dictobject.c.html#1903"><span class="True">    1903:</span></a>     <span class="f">}</span>
<a name="1904" /><a href="dictobject.c.html#1904"><span class="True">    1904:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="1905" /><a href="dictobject.c.html#1905"><span class="True">    1905:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="1906" /><a href="dictobject.c.html#1906"><span class="True">    1906:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1907" /><a href="dictobject.c.html#1907"><span class="True">    1907:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="1908" /><a href="dictobject.c.html#1908"><span class="True">    1908:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1909" /><a href="dictobject.c.html#1909"><span class="True">    1909:</span></a>     <span class="f">}</span>
<a name="1910" /><a href="dictobject.c.html#1910"><span class="True">    1910:</span></a>     <span class="m">return</span> <span class="b">_PyDict_Pop_KnownHash</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">deflt</span><span class="f">)</span><span class="f">;</span>
<a name="1911" /><a href="dictobject.c.html#1911"><span class="True">    1911:</span></a> <span class="f">}</span>
<a name="1912" /><span class="True">    1912:</span> 
<a name="1913" /><span class="True">    1913:</span> <span class="k">/* Internal version of dict.from_keys().  It is subclass-friendly. */</span>
<a name="1914" /><a href="dictobject.c.html#1914"><span class="True">    1914:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="1915" /><a href="dictobject.c.html#1915"><span class="True">    1915:</span></a> <span class="b">_PyDict_FromKeys</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">cls</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">iterable</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">)</span>
<a name="1916" /><a href="dictobject.c.html#1916"><span class="True">    1916:</span></a> <span class="f">{</span>
<a name="1917" /><a href="dictobject.c.html#1917"><span class="True">    1917:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">it</span><span class="f">;</span>       <span class="k">/* iter(iterable) */</span>
<a name="1918" /><a href="dictobject.c.html#1918"><span class="True">    1918:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">;</span>
<a name="1919" /><a href="dictobject.c.html#1919"><span class="True">    1919:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">d</span><span class="f">;</span>
<a name="1920" /><a href="dictobject.c.html#1920"><span class="True">    1920:</span></a>     <span class="m">int</span> <span class="b">status</span><span class="f">;</span>
<a name="1921" /><span class="True">    1921:</span> 
<a name="1922" /><a href="dictobject.c.html#1922"><span class="True">    1922:</span></a>     <span class="b">d</span> <span class="f">=</span> <span class="b">PyObject_CallObject</span><span class="f">(</span><span class="b">cls</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="1923" /><a href="dictobject.c.html#1923"><span class="True">    1923:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">d</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="1924" /><a href="dictobject.c.html#1924"><span class="True">    1924:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1925" /><span class="True">    1925:</span> 
<a name="1926" /><a href="dictobject.c.html#1926"><span class="True">    1926:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrRXhhY3RfMA__"><span class="b">PyDict_CheckExact</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">d</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="1927" /><a href="dictobject.c.html#1927"><span class="True">    1927:</span></a>         <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrRXhhY3RfMA__"><span class="b">PyDict_CheckExact</span></a><span class="f">(</span><span class="b">iterable</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1928" /><a href="dictobject.c.html#1928"><span class="True">    1928:</span></a>             <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">d</span><span class="f">;</span>
<a name="1929" /><a href="dictobject.c.html#1929"><span class="True">    1929:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">oldvalue</span><span class="f">;</span>
<a name="1930" /><a href="dictobject.c.html#1930"><span class="True">    1930:</span></a>             <span class="b">Py_ssize_t</span> <span class="b">pos</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="1931" /><a href="dictobject.c.html#1931"><span class="True">    1931:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">;</span>
<a name="1932" /><a href="dictobject.c.html#1932"><span class="True">    1932:</span></a>             <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="1933" /><span class="True">    1933:</span> 
<a name="1934" /><a href="dictobject.c.html#1934"><span class="True">    1934:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">dictresize</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <a href="macros_ref.html#_RVNUSU1BVEVfU0laRV8w"><span class="b">ESTIMATE_SIZE</span></a><span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">iterable</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1935" /><a href="dictobject.c.html#1935"><span class="True">    1935:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="1936" /><a href="dictobject.c.html#1936"><span class="True">    1936:</span></a>                 <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1937" /><a href="dictobject.c.html#1937"><span class="True">    1937:</span></a>             <span class="f">}</span>
<a name="1938" /><span class="True">    1938:</span> 
<a name="1939" /><a href="dictobject.c.html#1939"><span class="True">    1939:</span></a>             <span class="m">while</span> <span class="f">(</span><span class="b">_PyDict_Next</span><span class="f">(</span><span class="b">iterable</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">pos</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">key</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">oldvalue</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hash</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1940" /><a href="dictobject.c.html#1940"><span class="True">    1940:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">insertdict</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1941" /><a href="dictobject.c.html#1941"><span class="True">    1941:</span></a>                     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="1942" /><a href="dictobject.c.html#1942"><span class="True">    1942:</span></a>                     <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1943" /><a href="dictobject.c.html#1943"><span class="True">    1943:</span></a>                 <span class="f">}</span>
<a name="1944" /><a href="dictobject.c.html#1944"><span class="True">    1944:</span></a>             <span class="f">}</span>
<a name="1945" /><a href="dictobject.c.html#1945"><span class="True">    1945:</span></a>             <span class="m">return</span> <span class="b">d</span><span class="f">;</span>
<a name="1946" /><a href="dictobject.c.html#1946"><span class="True">    1946:</span></a>         <span class="f">}</span>
<a name="1947" /><a href="dictobject.c.html#1947"><span class="True">    1947:</span></a>         <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlBbnlTZXRfQ2hlY2tFeGFjdF8w"><span class="b">PyAnySet_CheckExact</span></a><span class="f">(</span><span class="b">iterable</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1948" /><a href="dictobject.c.html#1948"><span class="True">    1948:</span></a>             <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">d</span><span class="f">;</span>
<a name="1949" /><a href="dictobject.c.html#1949"><span class="True">    1949:</span></a>             <span class="b">Py_ssize_t</span> <span class="b">pos</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="1950" /><a href="dictobject.c.html#1950"><span class="True">    1950:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">;</span>
<a name="1951" /><a href="dictobject.c.html#1951"><span class="True">    1951:</span></a>             <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="1952" /><span class="True">    1952:</span> 
<a name="1953" /><a href="dictobject.c.html#1953"><span class="True">    1953:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">dictresize</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <a href="macros_ref.html#_RVNUSU1BVEVfU0laRV8w"><span class="b">ESTIMATE_SIZE</span></a><span class="f">(</span><a href="macros_ref.html#_UHlTZXRfR0VUX1NJWkVfMA__"><span class="b">PySet_GET_SIZE</span></a><span class="f">(</span><span class="b">iterable</span><span class="f">)</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1954" /><a href="dictobject.c.html#1954"><span class="True">    1954:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="1955" /><a href="dictobject.c.html#1955"><span class="True">    1955:</span></a>                 <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1956" /><a href="dictobject.c.html#1956"><span class="True">    1956:</span></a>             <span class="f">}</span>
<a name="1957" /><span class="True">    1957:</span> 
<a name="1958" /><a href="dictobject.c.html#1958"><span class="True">    1958:</span></a>             <span class="m">while</span> <span class="f">(</span><span class="b">_PySet_NextEntry</span><span class="f">(</span><span class="b">iterable</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">pos</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">key</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hash</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1959" /><a href="dictobject.c.html#1959"><span class="True">    1959:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">insertdict</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1960" /><a href="dictobject.c.html#1960"><span class="True">    1960:</span></a>                     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="1961" /><a href="dictobject.c.html#1961"><span class="True">    1961:</span></a>                     <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1962" /><a href="dictobject.c.html#1962"><span class="True">    1962:</span></a>                 <span class="f">}</span>
<a name="1963" /><a href="dictobject.c.html#1963"><span class="True">    1963:</span></a>             <span class="f">}</span>
<a name="1964" /><a href="dictobject.c.html#1964"><span class="True">    1964:</span></a>             <span class="m">return</span> <span class="b">d</span><span class="f">;</span>
<a name="1965" /><a href="dictobject.c.html#1965"><span class="True">    1965:</span></a>         <span class="f">}</span>
<a name="1966" /><a href="dictobject.c.html#1966"><span class="True">    1966:</span></a>     <span class="f">}</span>
<a name="1967" /><span class="True">    1967:</span> 
<a name="1968" /><a href="dictobject.c.html#1968"><span class="True">    1968:</span></a>     <span class="b">it</span> <span class="f">=</span> <span class="b">PyObject_GetIter</span><span class="f">(</span><span class="b">iterable</span><span class="f">)</span><span class="f">;</span>
<a name="1969" /><a href="dictobject.c.html#1969"><span class="True">    1969:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">it</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">{</span>
<a name="1970" /><a href="dictobject.c.html#1970"><span class="True">    1970:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="1971" /><a href="dictobject.c.html#1971"><span class="True">    1971:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1972" /><a href="dictobject.c.html#1972"><span class="True">    1972:</span></a>     <span class="f">}</span>
<a name="1973" /><span class="True">    1973:</span> 
<a name="1974" /><a href="dictobject.c.html#1974"><span class="True">    1974:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrRXhhY3RfMA__"><span class="b">PyDict_CheckExact</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="1975" /><a href="dictobject.c.html#1975"><span class="True">    1975:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="f">(</span><span class="b">key</span> <span class="f">=</span> <span class="b">PyIter_Next</span><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">)</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1976" /><a href="dictobject.c.html#1976"><span class="True">    1976:</span></a>             <span class="b">status</span> <span class="f">=</span> <span class="b">PyDict_SetItem</span><span class="f">(</span><span class="b">d</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="1977" /><a href="dictobject.c.html#1977"><span class="True">    1977:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1978" /><a href="dictobject.c.html#1978"><span class="True">    1978:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">status</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1979" /><a href="dictobject.c.html#1979"><span class="True">    1979:</span></a>                 <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="1980" /><a href="dictobject.c.html#1980"><span class="True">    1980:</span></a>         <span class="f">}</span>
<a name="1981" /><a href="dictobject.c.html#1981"><span class="True">    1981:</span></a>     <span class="f">}</span> <span class="m">else</span> <span class="f">{</span>
<a name="1982" /><a href="dictobject.c.html#1982"><span class="True">    1982:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="f">(</span><span class="b">key</span> <span class="f">=</span> <span class="b">PyIter_Next</span><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">)</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="1983" /><a href="dictobject.c.html#1983"><span class="True">    1983:</span></a>             <span class="b">status</span> <span class="f">=</span> <span class="b">PyObject_SetItem</span><span class="f">(</span><span class="b">d</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="1984" /><a href="dictobject.c.html#1984"><span class="True">    1984:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="1985" /><a href="dictobject.c.html#1985"><span class="True">    1985:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">status</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="1986" /><a href="dictobject.c.html#1986"><span class="True">    1986:</span></a>                 <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="1987" /><a href="dictobject.c.html#1987"><span class="True">    1987:</span></a>         <span class="f">}</span>
<a name="1988" /><a href="dictobject.c.html#1988"><span class="True">    1988:</span></a>     <span class="f">}</span>
<a name="1989" /><span class="True">    1989:</span> 
<a name="1990" /><a href="dictobject.c.html#1990"><span class="True">    1990:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="1991" /><a href="dictobject.c.html#1991"><span class="True">    1991:</span></a>         <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="1992" /><a href="dictobject.c.html#1992"><span class="True">    1992:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">;</span>
<a name="1993" /><a href="dictobject.c.html#1993"><span class="True">    1993:</span></a>     <span class="m">return</span> <span class="b">d</span><span class="f">;</span>
<a name="1994" /><span class="True">    1994:</span> 
<a name="1995" /><a href="dictobject.c.html#1995"><span class="True">    1995:</span></a> <span class="b">Fail</span><span class="f">:</span>
<a name="1996" /><a href="dictobject.c.html#1996"><span class="True">    1996:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">;</span>
<a name="1997" /><a href="dictobject.c.html#1997"><span class="True">    1997:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="1998" /><a href="dictobject.c.html#1998"><span class="True">    1998:</span></a>     <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="1999" /><a href="dictobject.c.html#1999"><span class="True">    1999:</span></a> <span class="f">}</span>
<a name="2000" /><span class="True">    2000:</span> 
<a name="2001" /><span class="True">    2001:</span> <span class="k">/* Methods */</span>
<a name="2002" /><span class="True">    2002:</span> 
<a name="2003" /><a href="dictobject.c.html#2003"><span class="True">    2003:</span></a> <span class="m">static</span> <span class="m">void</span>
<a name="2004" /><a href="dictobject.c.html#2004"><span class="True">    2004:</span></a> <span class="b">dict_dealloc</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2005" /><a href="dictobject.c.html#2005"><span class="True">    2005:</span></a> <span class="f">{</span>
<a name="2006" /><a href="dictobject.c.html#2006"><span class="True">    2006:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">values</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">;</span>
<a name="2007" /><a href="dictobject.c.html#2007"><span class="True">    2007:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="2008" /><a href="dictobject.c.html#2008"><span class="True">    2008:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="2009" /><a href="dictobject.c.html#2009"><span class="True">    2009:</span></a>     <span class="b">PyObject_GC_UnTrack</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2010" /><a href="dictobject.c.html#2010"><span class="True">    2010:</span></a>     <a href="macros_ref.html#_UHlfVFJBU0hDQU5fU0FGRV9CRUdJTl8w"><span class="b">Py_TRASHCAN_SAFE_BEGIN</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span>
<a name="2011" /><a href="dictobject.c.html#2011"><span class="True">    2011:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">values</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2012" /><a href="dictobject.c.html#2012"><span class="True">    2012:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">values</span> <span class="f">!=</span> <span class="b">empty_values</span><span class="f">)</span> <span class="f">{</span>
<a name="2013" /><a href="dictobject.c.html#2013"><span class="True">    2013:</span></a>             <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span> <span class="b">n</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="2014" /><a href="dictobject.c.html#2014"><span class="True">    2014:</span></a>                 <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">)</span><span class="f">;</span>
<a name="2015" /><a href="dictobject.c.html#2015"><span class="True">    2015:</span></a>             <span class="f">}</span>
<a name="2016" /><a href="dictobject.c.html#2016"><span class="True">    2016:</span></a>             <a href="macros_ref.html#_ZnJlZV92YWx1ZXNfMA__"><span class="b">free_values</span></a><span class="f">(</span><span class="b">values</span><span class="f">)</span><span class="f">;</span>
<a name="2017" /><a href="dictobject.c.html#2017"><span class="True">    2017:</span></a>         <span class="f">}</span>
<a name="2018" /><a href="dictobject.c.html#2018"><span class="True">    2018:</span></a>         <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="2019" /><a href="dictobject.c.html#2019"><span class="True">    2019:</span></a>     <span class="f">}</span>
<a name="2020" /><a href="dictobject.c.html#2020"><span class="True">    2020:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">keys</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2021" /><a href="dictobject.c.html#2021"><span class="True">    2021:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="2022" /><a href="dictobject.c.html#2022"><span class="True">    2022:</span></a>         <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="2023" /><a href="dictobject.c.html#2023"><span class="True">    2023:</span></a>     <span class="f">}</span>
<a name="2024" /><a href="dictobject.c.html#2024"><span class="True">    2024:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">numfree</span> <span class="f">&lt;</span> <a href="macros_ref.html#_UHlEaWN0X01BWEZSRUVMSVNUXzA_"><span class="b">PyDict_MAXFREELIST</span></a> <span class="f">&amp;&amp;</span> <a href="macros_ref.html#_UHlfVFlQRV8w"><span class="b">Py_TYPE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">==</span> <span class="f">&amp;</span><span class="b">PyDict_Type</span><span class="f">)</span>
<a name="2025" /><a href="dictobject.c.html#2025"><span class="True">    2025:</span></a>         <span class="b">free_list</span><span class="f">[</span><span class="b">numfree</span><span class="f">++</span><span class="f">]</span> <span class="f">=</span> <span class="b">mp</span><span class="f">;</span>
<a name="2026" /><a href="dictobject.c.html#2026"><span class="True">    2026:</span></a>     <span class="m">else</span>
<a name="2027" /><a href="dictobject.c.html#2027"><span class="True">    2027:</span></a>         <a href="macros_ref.html#_UHlfVFlQRV8w"><span class="b">Py_TYPE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">tp_free</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2028" /><a href="dictobject.c.html#2028"><span class="True">    2028:</span></a>     <a href="macros_ref.html#_UHlfVFJBU0hDQU5fU0FGRV9FTkRfMA__"><span class="b">Py_TRASHCAN_SAFE_END</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span>
<a name="2029" /><a href="dictobject.c.html#2029"><span class="True">    2029:</span></a> <span class="f">}</span>
<a name="2030" /><span class="True">    2030:</span> 
<a name="2031" /><span class="True">    2031:</span> 
<a name="2032" /><a href="dictobject.c.html#2032"><span class="True">    2032:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2033" /><a href="dictobject.c.html#2033"><span class="True">    2033:</span></a> <span class="b">dict_repr</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2034" /><a href="dictobject.c.html#2034"><span class="True">    2034:</span></a> <span class="f">{</span>
<a name="2035" /><a href="dictobject.c.html#2035"><span class="True">    2035:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">;</span>
<a name="2036" /><a href="dictobject.c.html#2036"><span class="True">    2036:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span> <span class="f">*</span><span class="b">value</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2037" /><a href="dictobject.c.html#2037"><span class="True">    2037:</span></a>     <span class="b">_PyUnicodeWriter</span> <span class="b">writer</span><span class="f">;</span>
<a name="2038" /><a href="dictobject.c.html#2038"><span class="True">    2038:</span></a>     <span class="m">int</span> <span class="b">first</span><span class="f">;</span>
<a name="2039" /><span class="True">    2039:</span> 
<a name="2040" /><a href="dictobject.c.html#2040"><span class="True">    2040:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="b">Py_ReprEnter</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2041" /><a href="dictobject.c.html#2041"><span class="True">    2041:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">i</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2042" /><a href="dictobject.c.html#2042"><span class="True">    2042:</span></a>         <span class="m">return</span> <span class="b">i</span> <span class="f">&gt;</span> <span class="c">0</span> <span class="f">?</span> <span class="b">PyUnicode_FromString</span><span class="f">(</span><span class="e">&quot;{...}&quot;</span><span class="f">)</span> <span class="f">:</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2043" /><a href="dictobject.c.html#2043"><span class="True">    2043:</span></a>     <span class="f">}</span>
<a name="2044" /><span class="True">    2044:</span> 
<a name="2045" /><a href="dictobject.c.html#2045"><span class="True">    2045:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2046" /><a href="dictobject.c.html#2046"><span class="True">    2046:</span></a>         <span class="b">Py_ReprLeave</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2047" /><a href="dictobject.c.html#2047"><span class="True">    2047:</span></a>         <span class="m">return</span> <span class="b">PyUnicode_FromString</span><span class="f">(</span><span class="e">&quot;{}&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="2048" /><a href="dictobject.c.html#2048"><span class="True">    2048:</span></a>     <span class="f">}</span>
<a name="2049" /><span class="True">    2049:</span> 
<a name="2050" /><a href="dictobject.c.html#2050"><span class="True">    2050:</span></a>     <span class="b">_PyUnicodeWriter_Init</span><span class="f">(</span><span class="f">&amp;</span><span class="b">writer</span><span class="f">)</span><span class="f">;</span>
<a name="2051" /><a href="dictobject.c.html#2051"><span class="True">    2051:</span></a>     <span class="b">writer</span><span class="f">.</span><span class="b">overallocate</span> <span class="f">=</span> <span class="c">1</span><span class="f">;</span>
<a name="2052" /><span class="True">    2052:</span>     <span class="k">/* &quot;{&quot; + &quot;1: 2&quot; + &quot;, 3: 4&quot; * (len - 1) + &quot;}&quot; */</span>
<a name="2053" /><a href="dictobject.c.html#2053"><span class="True">    2053:</span></a>     <span class="b">writer</span><span class="f">.</span><span class="b">min_length</span> <span class="f">=</span> <span class="c">1</span> <span class="f">+</span> <span class="c">4</span> <span class="f">+</span> <span class="f">(</span><span class="c">2</span> <span class="f">+</span> <span class="c">4</span><span class="f">)</span> <span class="f">*</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">-</span> <span class="c">1</span><span class="f">)</span> <span class="f">+</span> <span class="c">1</span><span class="f">;</span>
<a name="2054" /><span class="True">    2054:</span> 
<a name="2055" /><a href="dictobject.c.html#2055"><span class="True">    2055:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">_PyUnicodeWriter_WriteChar</span><span class="f">(</span><span class="f">&amp;</span><span class="b">writer</span><span class="f">,</span> <span class="d">&apos;{&apos;</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="2056" /><a href="dictobject.c.html#2056"><span class="True">    2056:</span></a>         <span class="m">goto</span> <span class="b">error</span><span class="f">;</span>
<a name="2057" /><span class="True">    2057:</span> 
<a name="2058" /><span class="True">    2058:</span>     <span class="k">/* Do repr() on each key+value pair, and insert &quot;: &quot; between them.</span>
<a name="2059" /><span class="True">    2059:</span> <span class="k">       Note that repr may mutate the dict. */</span>
<a name="2060" /><a href="dictobject.c.html#2060"><span class="True">    2060:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="2061" /><a href="dictobject.c.html#2061"><span class="True">    2061:</span></a>     <span class="b">first</span> <span class="f">=</span> <span class="c">1</span><span class="f">;</span>
<a name="2062" /><a href="dictobject.c.html#2062"><span class="True">    2062:</span></a>     <span class="m">while</span> <span class="f">(</span><span class="b">PyDict_Next</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">i</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">key</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2063" /><a href="dictobject.c.html#2063"><span class="True">    2063:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">s</span><span class="f">;</span>
<a name="2064" /><a href="dictobject.c.html#2064"><span class="True">    2064:</span></a>         <span class="m">int</span> <span class="b">res</span><span class="f">;</span>
<a name="2065" /><span class="True">    2065:</span> 
<a name="2066" /><span class="True">    2066:</span>         <span class="k">/* Prevent repr from deleting key or value during key format. */</span>
<a name="2067" /><a href="dictobject.c.html#2067"><span class="True">    2067:</span></a>         <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2068" /><a href="dictobject.c.html#2068"><span class="True">    2068:</span></a>         <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2069" /><span class="True">    2069:</span> 
<a name="2070" /><a href="dictobject.c.html#2070"><span class="True">    2070:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">first</span><span class="f">)</span> <span class="f">{</span>
<a name="2071" /><a href="dictobject.c.html#2071"><span class="True">    2071:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">_PyUnicodeWriter_WriteASCIIString</span><span class="f">(</span><span class="f">&amp;</span><span class="b">writer</span><span class="f">,</span> <span class="e">&quot;, &quot;</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="2072" /><a href="dictobject.c.html#2072"><span class="True">    2072:</span></a>                 <span class="m">goto</span> <span class="b">error</span><span class="f">;</span>
<a name="2073" /><a href="dictobject.c.html#2073"><span class="True">    2073:</span></a>         <span class="f">}</span>
<a name="2074" /><a href="dictobject.c.html#2074"><span class="True">    2074:</span></a>         <span class="b">first</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="2075" /><span class="True">    2075:</span> 
<a name="2076" /><a href="dictobject.c.html#2076"><span class="True">    2076:</span></a>         <span class="b">s</span> <span class="f">=</span> <span class="b">PyObject_Repr</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2077" /><a href="dictobject.c.html#2077"><span class="True">    2077:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">s</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2078" /><a href="dictobject.c.html#2078"><span class="True">    2078:</span></a>             <span class="m">goto</span> <span class="b">error</span><span class="f">;</span>
<a name="2079" /><a href="dictobject.c.html#2079"><span class="True">    2079:</span></a>         <span class="b">res</span> <span class="f">=</span> <span class="b">_PyUnicodeWriter_WriteStr</span><span class="f">(</span><span class="f">&amp;</span><span class="b">writer</span><span class="f">,</span> <span class="b">s</span><span class="f">)</span><span class="f">;</span>
<a name="2080" /><a href="dictobject.c.html#2080"><span class="True">    2080:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">s</span><span class="f">)</span><span class="f">;</span>
<a name="2081" /><a href="dictobject.c.html#2081"><span class="True">    2081:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">res</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="2082" /><a href="dictobject.c.html#2082"><span class="True">    2082:</span></a>             <span class="m">goto</span> <span class="b">error</span><span class="f">;</span>
<a name="2083" /><span class="True">    2083:</span> 
<a name="2084" /><a href="dictobject.c.html#2084"><span class="True">    2084:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">_PyUnicodeWriter_WriteASCIIString</span><span class="f">(</span><span class="f">&amp;</span><span class="b">writer</span><span class="f">,</span> <span class="e">&quot;: &quot;</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="2085" /><a href="dictobject.c.html#2085"><span class="True">    2085:</span></a>             <span class="m">goto</span> <span class="b">error</span><span class="f">;</span>
<a name="2086" /><span class="True">    2086:</span> 
<a name="2087" /><a href="dictobject.c.html#2087"><span class="True">    2087:</span></a>         <span class="b">s</span> <span class="f">=</span> <span class="b">PyObject_Repr</span><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2088" /><a href="dictobject.c.html#2088"><span class="True">    2088:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">s</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2089" /><a href="dictobject.c.html#2089"><span class="True">    2089:</span></a>             <span class="m">goto</span> <span class="b">error</span><span class="f">;</span>
<a name="2090" /><a href="dictobject.c.html#2090"><span class="True">    2090:</span></a>         <span class="b">res</span> <span class="f">=</span> <span class="b">_PyUnicodeWriter_WriteStr</span><span class="f">(</span><span class="f">&amp;</span><span class="b">writer</span><span class="f">,</span> <span class="b">s</span><span class="f">)</span><span class="f">;</span>
<a name="2091" /><a href="dictobject.c.html#2091"><span class="True">    2091:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">s</span><span class="f">)</span><span class="f">;</span>
<a name="2092" /><a href="dictobject.c.html#2092"><span class="True">    2092:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">res</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="2093" /><a href="dictobject.c.html#2093"><span class="True">    2093:</span></a>             <span class="m">goto</span> <span class="b">error</span><span class="f">;</span>
<a name="2094" /><span class="True">    2094:</span> 
<a name="2095" /><a href="dictobject.c.html#2095"><span class="True">    2095:</span></a>         <a href="macros_ref.html#_UHlfQ0xFQVJfMA__"><span class="b">Py_CLEAR</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2096" /><a href="dictobject.c.html#2096"><span class="True">    2096:</span></a>         <a href="macros_ref.html#_UHlfQ0xFQVJfMA__"><span class="b">Py_CLEAR</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2097" /><a href="dictobject.c.html#2097"><span class="True">    2097:</span></a>     <span class="f">}</span>
<a name="2098" /><span class="True">    2098:</span> 
<a name="2099" /><a href="dictobject.c.html#2099"><span class="True">    2099:</span></a>     <span class="b">writer</span><span class="f">.</span><span class="b">overallocate</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="2100" /><a href="dictobject.c.html#2100"><span class="True">    2100:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">_PyUnicodeWriter_WriteChar</span><span class="f">(</span><span class="f">&amp;</span><span class="b">writer</span><span class="f">,</span> <span class="d">&apos;}&apos;</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="2101" /><a href="dictobject.c.html#2101"><span class="True">    2101:</span></a>         <span class="m">goto</span> <span class="b">error</span><span class="f">;</span>
<a name="2102" /><span class="True">    2102:</span> 
<a name="2103" /><a href="dictobject.c.html#2103"><span class="True">    2103:</span></a>     <span class="b">Py_ReprLeave</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2104" /><span class="True">    2104:</span> 
<a name="2105" /><a href="dictobject.c.html#2105"><span class="True">    2105:</span></a>     <span class="m">return</span> <span class="b">_PyUnicodeWriter_Finish</span><span class="f">(</span><span class="f">&amp;</span><span class="b">writer</span><span class="f">)</span><span class="f">;</span>
<a name="2106" /><span class="True">    2106:</span> 
<a name="2107" /><a href="dictobject.c.html#2107"><span class="True">    2107:</span></a> <span class="b">error</span><span class="f">:</span>
<a name="2108" /><a href="dictobject.c.html#2108"><span class="True">    2108:</span></a>     <span class="b">Py_ReprLeave</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2109" /><a href="dictobject.c.html#2109"><span class="True">    2109:</span></a>     <span class="b">_PyUnicodeWriter_Dealloc</span><span class="f">(</span><span class="f">&amp;</span><span class="b">writer</span><span class="f">)</span><span class="f">;</span>
<a name="2110" /><a href="dictobject.c.html#2110"><span class="True">    2110:</span></a>     <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2111" /><a href="dictobject.c.html#2111"><span class="True">    2111:</span></a>     <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2112" /><a href="dictobject.c.html#2112"><span class="True">    2112:</span></a>     <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2113" /><a href="dictobject.c.html#2113"><span class="True">    2113:</span></a> <span class="f">}</span>
<a name="2114" /><span class="True">    2114:</span> 
<a name="2115" /><a href="dictobject.c.html#2115"><span class="True">    2115:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span>
<a name="2116" /><a href="dictobject.c.html#2116"><span class="True">    2116:</span></a> <span class="b">dict_length</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2117" /><a href="dictobject.c.html#2117"><span class="True">    2117:</span></a> <span class="f">{</span>
<a name="2118" /><a href="dictobject.c.html#2118"><span class="True">    2118:</span></a>     <span class="m">return</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="2119" /><a href="dictobject.c.html#2119"><span class="True">    2119:</span></a> <span class="f">}</span>
<a name="2120" /><span class="True">    2120:</span> 
<a name="2121" /><a href="dictobject.c.html#2121"><span class="True">    2121:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2122" /><a href="dictobject.c.html#2122"><span class="True">    2122:</span></a> <span class="b">dict_subscript</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="2123" /><a href="dictobject.c.html#2123"><span class="True">    2123:</span></a> <span class="f">{</span>
<a name="2124" /><a href="dictobject.c.html#2124"><span class="True">    2124:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">;</span>
<a name="2125" /><a href="dictobject.c.html#2125"><span class="True">    2125:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="2126" /><a href="dictobject.c.html#2126"><span class="True">    2126:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="2127" /><a href="dictobject.c.html#2127"><span class="True">    2127:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="2128" /><span class="True">    2128:</span> 
<a name="2129" /><a href="dictobject.c.html#2129"><span class="True">    2129:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="2130" /><a href="dictobject.c.html#2130"><span class="True">    2130:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="2131" /><a href="dictobject.c.html#2131"><span class="True">    2131:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2132" /><a href="dictobject.c.html#2132"><span class="True">    2132:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="2133" /><a href="dictobject.c.html#2133"><span class="True">    2133:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2134" /><a href="dictobject.c.html#2134"><span class="True">    2134:</span></a>     <span class="f">}</span>
<a name="2135" /><a href="dictobject.c.html#2135"><span class="True">    2135:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="2136" /><a href="dictobject.c.html#2136"><span class="True">    2136:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="2137" /><a href="dictobject.c.html#2137"><span class="True">    2137:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2138" /><a href="dictobject.c.html#2138"><span class="True">    2138:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">||</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2139" /><a href="dictobject.c.html#2139"><span class="True">    2139:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrRXhhY3RfMA__"><span class="b">PyDict_CheckExact</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2140" /><span class="True">    2140:</span>             <span class="k">/* Look up __missing__ method if we&apos;re a subclass. */</span>
<a name="2141" /><a href="dictobject.c.html#2141"><span class="True">    2141:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">missing</span><span class="f">,</span> <span class="f">*</span><span class="b">res</span><span class="f">;</span>
<a name="2142" /><a href="dictobject.c.html#2142"><span class="True">    2142:</span></a>             <a href="macros_ref.html#_X1B5X0lERU5USUZJRVJfMA__"><span class="b">_Py_IDENTIFIER</span></a><span class="f">(</span><span class="b">__missing__</span><span class="f">)</span><span class="f">;</span>
<a name="2143" /><a href="dictobject.c.html#2143"><span class="True">    2143:</span></a>             <span class="b">missing</span> <span class="f">=</span> <span class="b">_PyObject_LookupSpecial</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyId___missing__</span><span class="f">)</span><span class="f">;</span>
<a name="2144" /><a href="dictobject.c.html#2144"><span class="True">    2144:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">missing</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2145" /><a href="dictobject.c.html#2145"><span class="True">    2145:</span></a>                 <span class="b">res</span> <span class="f">=</span> <span class="b">PyObject_CallFunctionObjArgs</span><span class="f">(</span><span class="b">missing</span><span class="f">,</span>
<a name="2146" /><a href="dictobject.c.html#2146"><span class="True">    2146:</span></a>                                                    <span class="b">key</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="2147" /><a href="dictobject.c.html#2147"><span class="True">    2147:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">missing</span><span class="f">)</span><span class="f">;</span>
<a name="2148" /><a href="dictobject.c.html#2148"><span class="True">    2148:</span></a>                 <span class="m">return</span> <span class="b">res</span><span class="f">;</span>
<a name="2149" /><a href="dictobject.c.html#2149"><span class="True">    2149:</span></a>             <span class="f">}</span>
<a name="2150" /><a href="dictobject.c.html#2150"><span class="True">    2150:</span></a>             <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="2151" /><a href="dictobject.c.html#2151"><span class="True">    2151:</span></a>                 <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2152" /><a href="dictobject.c.html#2152"><span class="True">    2152:</span></a>         <span class="f">}</span>
<a name="2153" /><a href="dictobject.c.html#2153"><span class="True">    2153:</span></a>         <span class="b">_PyErr_SetKeyError</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2154" /><a href="dictobject.c.html#2154"><span class="True">    2154:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2155" /><a href="dictobject.c.html#2155"><span class="True">    2155:</span></a>     <span class="f">}</span>
<a name="2156" /><a href="dictobject.c.html#2156"><span class="True">    2156:</span></a>     <span class="b">v</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="2157" /><a href="dictobject.c.html#2157"><span class="True">    2157:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">v</span><span class="f">)</span><span class="f">;</span>
<a name="2158" /><a href="dictobject.c.html#2158"><span class="True">    2158:</span></a>     <span class="m">return</span> <span class="b">v</span><span class="f">;</span>
<a name="2159" /><a href="dictobject.c.html#2159"><span class="True">    2159:</span></a> <span class="f">}</span>
<a name="2160" /><span class="True">    2160:</span> 
<a name="2161" /><a href="dictobject.c.html#2161"><span class="True">    2161:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="2162" /><a href="dictobject.c.html#2162"><span class="True">    2162:</span></a> <span class="b">dict_ass_sub</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">w</span><span class="f">)</span>
<a name="2163" /><a href="dictobject.c.html#2163"><span class="True">    2163:</span></a> <span class="f">{</span>
<a name="2164" /><a href="dictobject.c.html#2164"><span class="True">    2164:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">w</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2165" /><a href="dictobject.c.html#2165"><span class="True">    2165:</span></a>         <span class="m">return</span> <span class="b">PyDict_DelItem</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">,</span> <span class="b">v</span><span class="f">)</span><span class="f">;</span>
<a name="2166" /><a href="dictobject.c.html#2166"><span class="True">    2166:</span></a>     <span class="m">else</span>
<a name="2167" /><a href="dictobject.c.html#2167"><span class="True">    2167:</span></a>         <span class="m">return</span> <span class="b">PyDict_SetItem</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">,</span> <span class="b">v</span><span class="f">,</span> <span class="b">w</span><span class="f">)</span><span class="f">;</span>
<a name="2168" /><a href="dictobject.c.html#2168"><span class="True">    2168:</span></a> <span class="f">}</span>
<a name="2169" /><span class="True">    2169:</span> 
<a name="2170" /><a href="dictobject.c.html#2170"><span class="True">    2170:</span></a> <span class="m">static</span> <span class="b">PyMappingMethods</span> <span class="b">dict_as_mapping</span> <span class="f">=</span> <span class="f">{</span>
<a name="2171" /><a href="dictobject.c.html#2171"><span class="True">    2171:</span></a>     <span class="f">(</span><span class="b">lenfunc</span><span class="f">)</span><span class="b">dict_length</span><span class="f">,</span> <span class="k">/*mp_length*/</span>
<a name="2172" /><a href="dictobject.c.html#2172"><span class="True">    2172:</span></a>     <span class="f">(</span><span class="b">binaryfunc</span><span class="f">)</span><span class="b">dict_subscript</span><span class="f">,</span> <span class="k">/*mp_subscript*/</span>
<a name="2173" /><a href="dictobject.c.html#2173"><span class="True">    2173:</span></a>     <span class="f">(</span><span class="b">objobjargproc</span><span class="f">)</span><span class="b">dict_ass_sub</span><span class="f">,</span> <span class="k">/*mp_ass_subscript*/</span>
<a name="2174" /><a href="dictobject.c.html#2174"><span class="True">    2174:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="2175" /><span class="True">    2175:</span> 
<a name="2176" /><a href="dictobject.c.html#2176"><span class="True">    2176:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2177" /><a href="dictobject.c.html#2177"><span class="True">    2177:</span></a> <span class="b">dict_keys</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2178" /><a href="dictobject.c.html#2178"><span class="True">    2178:</span></a> <span class="f">{</span>
<a name="2179" /><a href="dictobject.c.html#2179"><span class="True">    2179:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">;</span>
<a name="2180" /><a href="dictobject.c.html#2180"><span class="True">    2180:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">j</span><span class="f">;</span>
<a name="2181" /><a href="dictobject.c.html#2181"><span class="True">    2181:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">;</span>
<a name="2182" /><a href="dictobject.c.html#2182"><span class="True">    2182:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">size</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">offset</span><span class="f">;</span>
<a name="2183" /><a href="dictobject.c.html#2183"><span class="True">    2183:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_ptr</span><span class="f">;</span>
<a name="2184" /><span class="True">    2184:</span> 
<a name="2185" /><a href="dictobject.c.html#2185"><span class="True">    2185:</span></a>   <span class="b">again</span><span class="f">:</span>
<a name="2186" /><a href="dictobject.c.html#2186"><span class="True">    2186:</span></a>     <span class="b">n</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="2187" /><a href="dictobject.c.html#2187"><span class="True">    2187:</span></a>     <span class="b">v</span> <span class="f">=</span> <span class="b">PyList_New</span><span class="f">(</span><span class="b">n</span><span class="f">)</span><span class="f">;</span>
<a name="2188" /><a href="dictobject.c.html#2188"><span class="True">    2188:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">v</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2189" /><a href="dictobject.c.html#2189"><span class="True">    2189:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2190" /><a href="dictobject.c.html#2190"><span class="True">    2190:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">n</span> <span class="f">!=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span> <span class="f">{</span>
<a name="2191" /><span class="True">    2191:</span>         <span class="k">/* Durnit.  The allocations caused the dict to resize.</span>
<a name="2192" /><span class="True">    2192:</span> <span class="k">         * Just start over, this shouldn&apos;t normally happen.</span>
<a name="2193" /><span class="True">    2193:</span> <span class="k">         */</span>
<a name="2194" /><a href="dictobject.c.html#2194"><span class="True">    2194:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">v</span><span class="f">)</span><span class="f">;</span>
<a name="2195" /><a href="dictobject.c.html#2195"><span class="True">    2195:</span></a>         <span class="m">goto</span> <span class="b">again</span><span class="f">;</span>
<a name="2196" /><a href="dictobject.c.html#2196"><span class="True">    2196:</span></a>     <span class="f">}</span>
<a name="2197" /><a href="dictobject.c.html#2197"><span class="True">    2197:</span></a>     <span class="b">ep</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="2198" /><a href="dictobject.c.html#2198"><span class="True">    2198:</span></a>     <span class="b">size</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="2199" /><a href="dictobject.c.html#2199"><span class="True">    2199:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span> <span class="f">{</span>
<a name="2200" /><a href="dictobject.c.html#2200"><span class="True">    2200:</span></a>         <span class="b">value_ptr</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">;</span>
<a name="2201" /><a href="dictobject.c.html#2201"><span class="True">    2201:</span></a>         <span class="b">offset</span> <span class="f">=</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2202" /><a href="dictobject.c.html#2202"><span class="True">    2202:</span></a>     <span class="f">}</span>
<a name="2203" /><a href="dictobject.c.html#2203"><span class="True">    2203:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="2204" /><a href="dictobject.c.html#2204"><span class="True">    2204:</span></a>         <span class="b">value_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span><span class="f">;</span>
<a name="2205" /><a href="dictobject.c.html#2205"><span class="True">    2205:</span></a>         <span class="b">offset</span> <span class="f">=</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeyEntry</span><span class="f">)</span><span class="f">;</span>
<a name="2206" /><a href="dictobject.c.html#2206"><span class="True">    2206:</span></a>     <span class="f">}</span>
<a name="2207" /><a href="dictobject.c.html#2207"><span class="True">    2207:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span> <span class="b">j</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">size</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="2208" /><a href="dictobject.c.html#2208"><span class="True">    2208:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="f">*</span><span class="b">value_ptr</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2209" /><a href="dictobject.c.html#2209"><span class="True">    2209:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span> <span class="f">=</span> <span class="b">ep</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_key</span><span class="f">;</span>
<a name="2210" /><a href="dictobject.c.html#2210"><span class="True">    2210:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2211" /><a href="dictobject.c.html#2211"><span class="True">    2211:</span></a>             <a href="macros_ref.html#_UHlMaXN0X1NFVF9JVEVNXzA_"><span class="b">PyList_SET_ITEM</span></a><span class="f">(</span><span class="b">v</span><span class="f">,</span> <span class="b">j</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2212" /><a href="dictobject.c.html#2212"><span class="True">    2212:</span></a>             <span class="b">j</span><span class="f">++</span><span class="f">;</span>
<a name="2213" /><a href="dictobject.c.html#2213"><span class="True">    2213:</span></a>         <span class="f">}</span>
<a name="2214" /><a href="dictobject.c.html#2214"><span class="True">    2214:</span></a>         <span class="b">value_ptr</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="b">value_ptr</span><span class="f">)</span> <span class="f">+</span> <span class="b">offset</span><span class="f">)</span><span class="f">;</span>
<a name="2215" /><a href="dictobject.c.html#2215"><span class="True">    2215:</span></a>     <span class="f">}</span>
<a name="2216" /><a href="dictobject.c.html#2216"><span class="True">    2216:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">j</span> <span class="f">==</span> <span class="b">n</span><span class="f">)</span><span class="f">;</span>
<a name="2217" /><a href="dictobject.c.html#2217"><span class="True">    2217:</span></a>     <span class="m">return</span> <span class="b">v</span><span class="f">;</span>
<a name="2218" /><a href="dictobject.c.html#2218"><span class="True">    2218:</span></a> <span class="f">}</span>
<a name="2219" /><span class="True">    2219:</span> 
<a name="2220" /><a href="dictobject.c.html#2220"><span class="True">    2220:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2221" /><a href="dictobject.c.html#2221"><span class="True">    2221:</span></a> <span class="b">dict_values</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2222" /><a href="dictobject.c.html#2222"><span class="True">    2222:</span></a> <span class="f">{</span>
<a name="2223" /><a href="dictobject.c.html#2223"><span class="True">    2223:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">;</span>
<a name="2224" /><a href="dictobject.c.html#2224"><span class="True">    2224:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">j</span><span class="f">;</span>
<a name="2225" /><a href="dictobject.c.html#2225"><span class="True">    2225:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">;</span>
<a name="2226" /><a href="dictobject.c.html#2226"><span class="True">    2226:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">size</span><span class="f">,</span> <span class="b">n</span><span class="f">,</span> <span class="b">offset</span><span class="f">;</span>
<a name="2227" /><a href="dictobject.c.html#2227"><span class="True">    2227:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_ptr</span><span class="f">;</span>
<a name="2228" /><span class="True">    2228:</span> 
<a name="2229" /><a href="dictobject.c.html#2229"><span class="True">    2229:</span></a>   <span class="b">again</span><span class="f">:</span>
<a name="2230" /><a href="dictobject.c.html#2230"><span class="True">    2230:</span></a>     <span class="b">n</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="2231" /><a href="dictobject.c.html#2231"><span class="True">    2231:</span></a>     <span class="b">v</span> <span class="f">=</span> <span class="b">PyList_New</span><span class="f">(</span><span class="b">n</span><span class="f">)</span><span class="f">;</span>
<a name="2232" /><a href="dictobject.c.html#2232"><span class="True">    2232:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">v</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2233" /><a href="dictobject.c.html#2233"><span class="True">    2233:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2234" /><a href="dictobject.c.html#2234"><span class="True">    2234:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">n</span> <span class="f">!=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span> <span class="f">{</span>
<a name="2235" /><span class="True">    2235:</span>         <span class="k">/* Durnit.  The allocations caused the dict to resize.</span>
<a name="2236" /><span class="True">    2236:</span> <span class="k">         * Just start over, this shouldn&apos;t normally happen.</span>
<a name="2237" /><span class="True">    2237:</span> <span class="k">         */</span>
<a name="2238" /><a href="dictobject.c.html#2238"><span class="True">    2238:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">v</span><span class="f">)</span><span class="f">;</span>
<a name="2239" /><a href="dictobject.c.html#2239"><span class="True">    2239:</span></a>         <span class="m">goto</span> <span class="b">again</span><span class="f">;</span>
<a name="2240" /><a href="dictobject.c.html#2240"><span class="True">    2240:</span></a>     <span class="f">}</span>
<a name="2241" /><a href="dictobject.c.html#2241"><span class="True">    2241:</span></a>     <span class="b">ep</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="2242" /><a href="dictobject.c.html#2242"><span class="True">    2242:</span></a>     <span class="b">size</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="2243" /><a href="dictobject.c.html#2243"><span class="True">    2243:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span> <span class="f">{</span>
<a name="2244" /><a href="dictobject.c.html#2244"><span class="True">    2244:</span></a>         <span class="b">value_ptr</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">;</span>
<a name="2245" /><a href="dictobject.c.html#2245"><span class="True">    2245:</span></a>         <span class="b">offset</span> <span class="f">=</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2246" /><a href="dictobject.c.html#2246"><span class="True">    2246:</span></a>     <span class="f">}</span>
<a name="2247" /><a href="dictobject.c.html#2247"><span class="True">    2247:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="2248" /><a href="dictobject.c.html#2248"><span class="True">    2248:</span></a>         <span class="b">value_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span><span class="f">;</span>
<a name="2249" /><a href="dictobject.c.html#2249"><span class="True">    2249:</span></a>         <span class="b">offset</span> <span class="f">=</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeyEntry</span><span class="f">)</span><span class="f">;</span>
<a name="2250" /><a href="dictobject.c.html#2250"><span class="True">    2250:</span></a>     <span class="f">}</span>
<a name="2251" /><a href="dictobject.c.html#2251"><span class="True">    2251:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span> <span class="b">j</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">size</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="2252" /><a href="dictobject.c.html#2252"><span class="True">    2252:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_ptr</span><span class="f">;</span>
<a name="2253" /><a href="dictobject.c.html#2253"><span class="True">    2253:</span></a>         <span class="b">value_ptr</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="b">value_ptr</span><span class="f">)</span> <span class="f">+</span> <span class="b">offset</span><span class="f">)</span><span class="f">;</span>
<a name="2254" /><a href="dictobject.c.html#2254"><span class="True">    2254:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2255" /><a href="dictobject.c.html#2255"><span class="True">    2255:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2256" /><a href="dictobject.c.html#2256"><span class="True">    2256:</span></a>             <a href="macros_ref.html#_UHlMaXN0X1NFVF9JVEVNXzA_"><span class="b">PyList_SET_ITEM</span></a><span class="f">(</span><span class="b">v</span><span class="f">,</span> <span class="b">j</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2257" /><a href="dictobject.c.html#2257"><span class="True">    2257:</span></a>             <span class="b">j</span><span class="f">++</span><span class="f">;</span>
<a name="2258" /><a href="dictobject.c.html#2258"><span class="True">    2258:</span></a>         <span class="f">}</span>
<a name="2259" /><a href="dictobject.c.html#2259"><span class="True">    2259:</span></a>     <span class="f">}</span>
<a name="2260" /><a href="dictobject.c.html#2260"><span class="True">    2260:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">j</span> <span class="f">==</span> <span class="b">n</span><span class="f">)</span><span class="f">;</span>
<a name="2261" /><a href="dictobject.c.html#2261"><span class="True">    2261:</span></a>     <span class="m">return</span> <span class="b">v</span><span class="f">;</span>
<a name="2262" /><a href="dictobject.c.html#2262"><span class="True">    2262:</span></a> <span class="f">}</span>
<a name="2263" /><span class="True">    2263:</span> 
<a name="2264" /><a href="dictobject.c.html#2264"><span class="True">    2264:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2265" /><a href="dictobject.c.html#2265"><span class="True">    2265:</span></a> <span class="b">dict_items</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2266" /><a href="dictobject.c.html#2266"><span class="True">    2266:</span></a> <span class="f">{</span>
<a name="2267" /><a href="dictobject.c.html#2267"><span class="True">    2267:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">;</span>
<a name="2268" /><a href="dictobject.c.html#2268"><span class="True">    2268:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">j</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="2269" /><a href="dictobject.c.html#2269"><span class="True">    2269:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">size</span><span class="f">,</span> <span class="b">offset</span><span class="f">;</span>
<a name="2270" /><a href="dictobject.c.html#2270"><span class="True">    2270:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">item</span><span class="f">,</span> <span class="f">*</span><span class="b">key</span><span class="f">;</span>
<a name="2271" /><a href="dictobject.c.html#2271"><span class="True">    2271:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">;</span>
<a name="2272" /><a href="dictobject.c.html#2272"><span class="True">    2272:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_ptr</span><span class="f">;</span>
<a name="2273" /><span class="True">    2273:</span> 
<a name="2274" /><span class="True">    2274:</span>     <span class="k">/* Preallocate the list of tuples, to avoid allocations during</span>
<a name="2275" /><span class="True">    2275:</span> <span class="k">     * the loop over the items, which could trigger GC, which</span>
<a name="2276" /><span class="True">    2276:</span> <span class="k">     * could resize the dict. :-(</span>
<a name="2277" /><span class="True">    2277:</span> <span class="k">     */</span>
<a name="2278" /><a href="dictobject.c.html#2278"><span class="True">    2278:</span></a>   <span class="b">again</span><span class="f">:</span>
<a name="2279" /><a href="dictobject.c.html#2279"><span class="True">    2279:</span></a>     <span class="b">n</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="2280" /><a href="dictobject.c.html#2280"><span class="True">    2280:</span></a>     <span class="b">v</span> <span class="f">=</span> <span class="b">PyList_New</span><span class="f">(</span><span class="b">n</span><span class="f">)</span><span class="f">;</span>
<a name="2281" /><a href="dictobject.c.html#2281"><span class="True">    2281:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">v</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2282" /><a href="dictobject.c.html#2282"><span class="True">    2282:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2283" /><a href="dictobject.c.html#2283"><span class="True">    2283:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="2284" /><a href="dictobject.c.html#2284"><span class="True">    2284:</span></a>         <span class="b">item</span> <span class="f">=</span> <span class="b">PyTuple_New</span><span class="f">(</span><span class="c">2</span><span class="f">)</span><span class="f">;</span>
<a name="2285" /><a href="dictobject.c.html#2285"><span class="True">    2285:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">item</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2286" /><a href="dictobject.c.html#2286"><span class="True">    2286:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">v</span><span class="f">)</span><span class="f">;</span>
<a name="2287" /><a href="dictobject.c.html#2287"><span class="True">    2287:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2288" /><a href="dictobject.c.html#2288"><span class="True">    2288:</span></a>         <span class="f">}</span>
<a name="2289" /><a href="dictobject.c.html#2289"><span class="True">    2289:</span></a>         <a href="macros_ref.html#_UHlMaXN0X1NFVF9JVEVNXzA_"><span class="b">PyList_SET_ITEM</span></a><span class="f">(</span><span class="b">v</span><span class="f">,</span> <span class="b">i</span><span class="f">,</span> <span class="b">item</span><span class="f">)</span><span class="f">;</span>
<a name="2290" /><a href="dictobject.c.html#2290"><span class="True">    2290:</span></a>     <span class="f">}</span>
<a name="2291" /><a href="dictobject.c.html#2291"><span class="True">    2291:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">n</span> <span class="f">!=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span> <span class="f">{</span>
<a name="2292" /><span class="True">    2292:</span>         <span class="k">/* Durnit.  The allocations caused the dict to resize.</span>
<a name="2293" /><span class="True">    2293:</span> <span class="k">         * Just start over, this shouldn&apos;t normally happen.</span>
<a name="2294" /><span class="True">    2294:</span> <span class="k">         */</span>
<a name="2295" /><a href="dictobject.c.html#2295"><span class="True">    2295:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">v</span><span class="f">)</span><span class="f">;</span>
<a name="2296" /><a href="dictobject.c.html#2296"><span class="True">    2296:</span></a>         <span class="m">goto</span> <span class="b">again</span><span class="f">;</span>
<a name="2297" /><a href="dictobject.c.html#2297"><span class="True">    2297:</span></a>     <span class="f">}</span>
<a name="2298" /><span class="True">    2298:</span>     <span class="k">/* Nothing we do below makes any function calls. */</span>
<a name="2299" /><a href="dictobject.c.html#2299"><span class="True">    2299:</span></a>     <span class="b">ep</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="2300" /><a href="dictobject.c.html#2300"><span class="True">    2300:</span></a>     <span class="b">size</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="2301" /><a href="dictobject.c.html#2301"><span class="True">    2301:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span> <span class="f">{</span>
<a name="2302" /><a href="dictobject.c.html#2302"><span class="True">    2302:</span></a>         <span class="b">value_ptr</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">;</span>
<a name="2303" /><a href="dictobject.c.html#2303"><span class="True">    2303:</span></a>         <span class="b">offset</span> <span class="f">=</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="2304" /><a href="dictobject.c.html#2304"><span class="True">    2304:</span></a>     <span class="f">}</span>
<a name="2305" /><a href="dictobject.c.html#2305"><span class="True">    2305:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="2306" /><a href="dictobject.c.html#2306"><span class="True">    2306:</span></a>         <span class="b">value_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span><span class="f">;</span>
<a name="2307" /><a href="dictobject.c.html#2307"><span class="True">    2307:</span></a>         <span class="b">offset</span> <span class="f">=</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeyEntry</span><span class="f">)</span><span class="f">;</span>
<a name="2308" /><a href="dictobject.c.html#2308"><span class="True">    2308:</span></a>     <span class="f">}</span>
<a name="2309" /><a href="dictobject.c.html#2309"><span class="True">    2309:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span> <span class="b">j</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">size</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="2310" /><a href="dictobject.c.html#2310"><span class="True">    2310:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_ptr</span><span class="f">;</span>
<a name="2311" /><a href="dictobject.c.html#2311"><span class="True">    2311:</span></a>         <span class="b">value_ptr</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="f">)</span><span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="m">char</span> <span class="f">*</span><span class="f">)</span><span class="b">value_ptr</span><span class="f">)</span> <span class="f">+</span> <span class="b">offset</span><span class="f">)</span><span class="f">;</span>
<a name="2312" /><a href="dictobject.c.html#2312"><span class="True">    2312:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2313" /><a href="dictobject.c.html#2313"><span class="True">    2313:</span></a>             <span class="b">key</span> <span class="f">=</span> <span class="b">ep</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_key</span><span class="f">;</span>
<a name="2314" /><a href="dictobject.c.html#2314"><span class="True">    2314:</span></a>             <span class="b">item</span> <span class="f">=</span> <a href="macros_ref.html#_UHlMaXN0X0dFVF9JVEVNXzA_"><span class="b">PyList_GET_ITEM</span></a><span class="f">(</span><span class="b">v</span><span class="f">,</span> <span class="b">j</span><span class="f">)</span><span class="f">;</span>
<a name="2315" /><a href="dictobject.c.html#2315"><span class="True">    2315:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2316" /><a href="dictobject.c.html#2316"><span class="True">    2316:</span></a>             <a href="macros_ref.html#_UHlUdXBsZV9TRVRfSVRFTV8w"><span class="b">PyTuple_SET_ITEM</span></a><span class="f">(</span><span class="b">item</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2317" /><a href="dictobject.c.html#2317"><span class="True">    2317:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2318" /><a href="dictobject.c.html#2318"><span class="True">    2318:</span></a>             <a href="macros_ref.html#_UHlUdXBsZV9TRVRfSVRFTV8w"><span class="b">PyTuple_SET_ITEM</span></a><span class="f">(</span><span class="b">item</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2319" /><a href="dictobject.c.html#2319"><span class="True">    2319:</span></a>             <span class="b">j</span><span class="f">++</span><span class="f">;</span>
<a name="2320" /><a href="dictobject.c.html#2320"><span class="True">    2320:</span></a>         <span class="f">}</span>
<a name="2321" /><a href="dictobject.c.html#2321"><span class="True">    2321:</span></a>     <span class="f">}</span>
<a name="2322" /><a href="dictobject.c.html#2322"><span class="True">    2322:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">j</span> <span class="f">==</span> <span class="b">n</span><span class="f">)</span><span class="f">;</span>
<a name="2323" /><a href="dictobject.c.html#2323"><span class="True">    2323:</span></a>     <span class="m">return</span> <span class="b">v</span><span class="f">;</span>
<a name="2324" /><a href="dictobject.c.html#2324"><span class="True">    2324:</span></a> <span class="f">}</span>
<a name="2325" /><span class="True">    2325:</span> 
<a name="2326" /><span class="True">    2326:</span> <span class="k">/*[clinic input]</span>
<a name="2327" /><span class="True">    2327:</span> <span class="k">@classmethod</span>
<a name="2328" /><span class="True">    2328:</span> <span class="k">dict.fromkeys</span>
<a name="2329" /><span class="True">    2329:</span> <span class="k">    iterable: object</span>
<a name="2330" /><span class="True">    2330:</span> <span class="k">    value: object=None</span>
<a name="2331" /><span class="True">    2331:</span> <span class="k">    /</span>
<a name="2332" /><span class="True">    2332:</span> <span class="k"></span>
<a name="2333" /><span class="True">    2333:</span> <span class="k">Returns a new dict with keys from iterable and values equal to value.</span>
<a name="2334" /><span class="True">    2334:</span> <span class="k">[clinic start generated code]*/</span>
<a name="2335" /><span class="True">    2335:</span> 
<a name="2336" /><a href="dictobject.c.html#2336"><span class="True">    2336:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2337" /><a href="dictobject.c.html#2337"><span class="True">    2337:</span></a> <span class="b">dict_fromkeys_impl</span><span class="f">(</span><span class="b">PyTypeObject</span> <span class="f">*</span><span class="b">type</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">iterable</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">)</span>
<a name="2338" /><span class="True">    2338:</span> <span class="k">/*[clinic end generated code: output=8fb98e4b10384999 input=b85a667f9bf4669d]*/</span>
<a name="2339" /><a href="dictobject.c.html#2339"><span class="True">    2339:</span></a> <span class="f">{</span>
<a name="2340" /><a href="dictobject.c.html#2340"><span class="True">    2340:</span></a>     <span class="m">return</span> <span class="b">_PyDict_FromKeys</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">type</span><span class="f">,</span> <span class="b">iterable</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2341" /><a href="dictobject.c.html#2341"><span class="True">    2341:</span></a> <span class="f">}</span>
<a name="2342" /><span class="True">    2342:</span> 
<a name="2343" /><a href="dictobject.c.html#2343"><span class="True">    2343:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="2344" /><a href="dictobject.c.html#2344"><span class="True">    2344:</span></a> <span class="b">dict_update_common</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">args</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">kwds</span><span class="f">,</span>
<a name="2345" /><a href="dictobject.c.html#2345"><span class="True">    2345:</span></a>                    <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">methname</span><span class="f">)</span>
<a name="2346" /><a href="dictobject.c.html#2346"><span class="True">    2346:</span></a> <span class="f">{</span>
<a name="2347" /><a href="dictobject.c.html#2347"><span class="True">    2347:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">arg</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2348" /><a href="dictobject.c.html#2348"><span class="True">    2348:</span></a>     <span class="m">int</span> <span class="b">result</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="2349" /><span class="True">    2349:</span> 
<a name="2350" /><a href="dictobject.c.html#2350"><span class="True">    2350:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">PyArg_UnpackTuple</span><span class="f">(</span><span class="b">args</span><span class="f">,</span> <span class="b">methname</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">arg</span><span class="f">)</span><span class="f">)</span>
<a name="2351" /><a href="dictobject.c.html#2351"><span class="True">    2351:</span></a>         <span class="b">result</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2352" /><span class="True">    2352:</span> 
<a name="2353" /><a href="dictobject.c.html#2353"><span class="True">    2353:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">arg</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2354" /><a href="dictobject.c.html#2354"><span class="True">    2354:</span></a>         <a href="macros_ref.html#_X1B5X0lERU5USUZJRVJfMA__"><span class="b">_Py_IDENTIFIER</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="2355" /><a href="dictobject.c.html#2355"><span class="True">    2355:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">_PyObject_HasAttrId</span><span class="f">(</span><span class="b">arg</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyId_keys</span><span class="f">)</span><span class="f">)</span>
<a name="2356" /><a href="dictobject.c.html#2356"><span class="True">    2356:</span></a>             <span class="b">result</span> <span class="f">=</span> <span class="b">PyDict_Merge</span><span class="f">(</span><span class="b">self</span><span class="f">,</span> <span class="b">arg</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="2357" /><a href="dictobject.c.html#2357"><span class="True">    2357:</span></a>         <span class="m">else</span>
<a name="2358" /><a href="dictobject.c.html#2358"><span class="True">    2358:</span></a>             <span class="b">result</span> <span class="f">=</span> <span class="b">PyDict_MergeFromSeq2</span><span class="f">(</span><span class="b">self</span><span class="f">,</span> <span class="b">arg</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="2359" /><a href="dictobject.c.html#2359"><span class="True">    2359:</span></a>     <span class="f">}</span>
<a name="2360" /><a href="dictobject.c.html#2360"><span class="True">    2360:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">result</span> <span class="f">==</span> <span class="c">0</span> <span class="f">&amp;&amp;</span> <span class="b">kwds</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2361" /><a href="dictobject.c.html#2361"><span class="True">    2361:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">PyArg_ValidateKeywordArguments</span><span class="f">(</span><span class="b">kwds</span><span class="f">)</span><span class="f">)</span>
<a name="2362" /><a href="dictobject.c.html#2362"><span class="True">    2362:</span></a>             <span class="b">result</span> <span class="f">=</span> <span class="b">PyDict_Merge</span><span class="f">(</span><span class="b">self</span><span class="f">,</span> <span class="b">kwds</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="2363" /><a href="dictobject.c.html#2363"><span class="True">    2363:</span></a>         <span class="m">else</span>
<a name="2364" /><a href="dictobject.c.html#2364"><span class="True">    2364:</span></a>             <span class="b">result</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2365" /><a href="dictobject.c.html#2365"><span class="True">    2365:</span></a>     <span class="f">}</span>
<a name="2366" /><a href="dictobject.c.html#2366"><span class="True">    2366:</span></a>     <span class="m">return</span> <span class="b">result</span><span class="f">;</span>
<a name="2367" /><a href="dictobject.c.html#2367"><span class="True">    2367:</span></a> <span class="f">}</span>
<a name="2368" /><span class="True">    2368:</span> 
<a name="2369" /><a href="dictobject.c.html#2369"><span class="True">    2369:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2370" /><a href="dictobject.c.html#2370"><span class="True">    2370:</span></a> <span class="b">dict_update</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">args</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">kwds</span><span class="f">)</span>
<a name="2371" /><a href="dictobject.c.html#2371"><span class="True">    2371:</span></a> <span class="f">{</span>
<a name="2372" /><a href="dictobject.c.html#2372"><span class="True">    2372:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dict_update_common</span><span class="f">(</span><span class="b">self</span><span class="f">,</span> <span class="b">args</span><span class="f">,</span> <span class="b">kwds</span><span class="f">,</span> <span class="e">&quot;update&quot;</span><span class="f">)</span> <span class="f">!=</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="2373" /><a href="dictobject.c.html#2373"><span class="True">    2373:</span></a>         <a href="macros_ref.html#_UHlfUkVUVVJOX05PTkVfMA__"><span class="b">Py_RETURN_NONE</span></a><span class="f">;</span>
<a name="2374" /><a href="dictobject.c.html#2374"><span class="True">    2374:</span></a>     <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2375" /><a href="dictobject.c.html#2375"><span class="True">    2375:</span></a> <span class="f">}</span>
<a name="2376" /><span class="True">    2376:</span> 
<a name="2377" /><span class="True">    2377:</span> <span class="k">/* Update unconditionally replaces existing items.</span>
<a name="2378" /><span class="True">    2378:</span> <span class="k">   Merge has a 3rd argument &apos;override&apos;; if set, it acts like Update,</span>
<a name="2379" /><span class="True">    2379:</span> <span class="k">   otherwise it leaves existing items unchanged.</span>
<a name="2380" /><span class="True">    2380:</span> <span class="k"></span>
<a name="2381" /><span class="True">    2381:</span> <span class="k">   PyDict_{Update,Merge} update/merge from a mapping object.</span>
<a name="2382" /><span class="True">    2382:</span> <span class="k"></span>
<a name="2383" /><span class="True">    2383:</span> <span class="k">   PyDict_MergeFromSeq2 updates/merges from any iterable object</span>
<a name="2384" /><span class="True">    2384:</span> <span class="k">   producing iterable objects of length 2.</span>
<a name="2385" /><span class="True">    2385:</span> <span class="k">*/</span>
<a name="2386" /><span class="True">    2386:</span> 
<a name="2387" /><a href="dictobject.c.html#2387"><span class="True">    2387:</span></a> <span class="m">int</span>
<a name="2388" /><a href="dictobject.c.html#2388"><span class="True">    2388:</span></a> <span class="b">PyDict_MergeFromSeq2</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">d</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">seq2</span><span class="f">,</span> <span class="m">int</span> <span class="b">override</span><span class="f">)</span>
<a name="2389" /><a href="dictobject.c.html#2389"><span class="True">    2389:</span></a> <span class="f">{</span>
<a name="2390" /><a href="dictobject.c.html#2390"><span class="True">    2390:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">it</span><span class="f">;</span>       <span class="k">/* iter(seq2) */</span>
<a name="2391" /><a href="dictobject.c.html#2391"><span class="True">    2391:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">;</span>       <span class="k">/* index into seq2 of current element */</span>
<a name="2392" /><a href="dictobject.c.html#2392"><span class="True">    2392:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">item</span><span class="f">;</span>     <span class="k">/* seq2[i] */</span>
<a name="2393" /><a href="dictobject.c.html#2393"><span class="True">    2393:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">fast</span><span class="f">;</span>     <span class="k">/* item as a 2-tuple or 2-list */</span>
<a name="2394" /><span class="True">    2394:</span> 
<a name="2395" /><a href="dictobject.c.html#2395"><span class="True">    2395:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">d</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="2396" /><a href="dictobject.c.html#2396"><span class="True">    2396:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2397" /><a href="dictobject.c.html#2397"><span class="True">    2397:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">seq2</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="2398" /><span class="True">    2398:</span> 
<a name="2399" /><a href="dictobject.c.html#2399"><span class="True">    2399:</span></a>     <span class="b">it</span> <span class="f">=</span> <span class="b">PyObject_GetIter</span><span class="f">(</span><span class="b">seq2</span><span class="f">)</span><span class="f">;</span>
<a name="2400" /><a href="dictobject.c.html#2400"><span class="True">    2400:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">it</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2401" /><a href="dictobject.c.html#2401"><span class="True">    2401:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2402" /><span class="True">    2402:</span> 
<a name="2403" /><a href="dictobject.c.html#2403"><span class="True">    2403:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="f">;</span> <span class="f">++</span><span class="b">i</span><span class="f">)</span> <span class="f">{</span>
<a name="2404" /><a href="dictobject.c.html#2404"><span class="True">    2404:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="f">*</span><span class="b">value</span><span class="f">;</span>
<a name="2405" /><a href="dictobject.c.html#2405"><span class="True">    2405:</span></a>         <span class="b">Py_ssize_t</span> <span class="b">n</span><span class="f">;</span>
<a name="2406" /><span class="True">    2406:</span> 
<a name="2407" /><a href="dictobject.c.html#2407"><span class="True">    2407:</span></a>         <span class="b">fast</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2408" /><a href="dictobject.c.html#2408"><span class="True">    2408:</span></a>         <span class="b">item</span> <span class="f">=</span> <span class="b">PyIter_Next</span><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">;</span>
<a name="2409" /><a href="dictobject.c.html#2409"><span class="True">    2409:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">item</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2410" /><a href="dictobject.c.html#2410"><span class="True">    2410:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="2411" /><a href="dictobject.c.html#2411"><span class="True">    2411:</span></a>                 <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="2412" /><a href="dictobject.c.html#2412"><span class="True">    2412:</span></a>             <span class="m">break</span><span class="f">;</span>
<a name="2413" /><a href="dictobject.c.html#2413"><span class="True">    2413:</span></a>         <span class="f">}</span>
<a name="2414" /><span class="True">    2414:</span> 
<a name="2415" /><span class="True">    2415:</span>         <span class="k">/* Convert item to sequence, and verify length 2. */</span>
<a name="2416" /><a href="dictobject.c.html#2416"><span class="True">    2416:</span></a>         <span class="b">fast</span> <span class="f">=</span> <span class="b">PySequence_Fast</span><span class="f">(</span><span class="b">item</span><span class="f">,</span> <span class="e">&quot;&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="2417" /><a href="dictobject.c.html#2417"><span class="True">    2417:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">fast</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2418" /><a href="dictobject.c.html#2418"><span class="True">    2418:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_ExceptionMatches</span><span class="f">(</span><span class="b">PyExc_TypeError</span><span class="f">)</span><span class="f">)</span>
<a name="2419" /><a href="dictobject.c.html#2419"><span class="True">    2419:</span></a>                 <span class="b">PyErr_Format</span><span class="f">(</span><span class="b">PyExc_TypeError</span><span class="f">,</span>
<a name="2420" /><a href="dictobject.c.html#2420"><span class="True">    2420:</span></a>                     <span class="e">&quot;cannot convert dictionary update &quot;</span>
<a name="2421" /><a href="dictobject.c.html#2421"><span class="True">    2421:</span></a>                     <span class="e">&quot;sequence element #%zd to a sequence&quot;</span><span class="f">,</span>
<a name="2422" /><a href="dictobject.c.html#2422"><span class="True">    2422:</span></a>                     <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="2423" /><a href="dictobject.c.html#2423"><span class="True">    2423:</span></a>             <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="2424" /><a href="dictobject.c.html#2424"><span class="True">    2424:</span></a>         <span class="f">}</span>
<a name="2425" /><a href="dictobject.c.html#2425"><span class="True">    2425:</span></a>         <span class="b">n</span> <span class="f">=</span> <a href="macros_ref.html#_UHlTZXF1ZW5jZV9GYXN0X0dFVF9TSVpFXzA_"><span class="b">PySequence_Fast_GET_SIZE</span></a><span class="f">(</span><span class="b">fast</span><span class="f">)</span><span class="f">;</span>
<a name="2426" /><a href="dictobject.c.html#2426"><span class="True">    2426:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">n</span> <span class="f">!=</span> <span class="c">2</span><span class="f">)</span> <span class="f">{</span>
<a name="2427" /><a href="dictobject.c.html#2427"><span class="True">    2427:</span></a>             <span class="b">PyErr_Format</span><span class="f">(</span><span class="b">PyExc_ValueError</span><span class="f">,</span>
<a name="2428" /><a href="dictobject.c.html#2428"><span class="True">    2428:</span></a>                          <span class="e">&quot;dictionary update sequence element #%zd &quot;</span>
<a name="2429" /><a href="dictobject.c.html#2429"><span class="True">    2429:</span></a>                          <span class="e">&quot;has length %zd; 2 is required&quot;</span><span class="f">,</span>
<a name="2430" /><a href="dictobject.c.html#2430"><span class="True">    2430:</span></a>                          <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">)</span><span class="f">;</span>
<a name="2431" /><a href="dictobject.c.html#2431"><span class="True">    2431:</span></a>             <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="2432" /><a href="dictobject.c.html#2432"><span class="True">    2432:</span></a>         <span class="f">}</span>
<a name="2433" /><span class="True">    2433:</span> 
<a name="2434" /><span class="True">    2434:</span>         <span class="k">/* Update/merge with this (key, value) pair. */</span>
<a name="2435" /><a href="dictobject.c.html#2435"><span class="True">    2435:</span></a>         <span class="b">key</span> <span class="f">=</span> <a href="macros_ref.html#_UHlTZXF1ZW5jZV9GYXN0X0dFVF9JVEVNXzA_"><span class="b">PySequence_Fast_GET_ITEM</span></a><span class="f">(</span><span class="b">fast</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="2436" /><a href="dictobject.c.html#2436"><span class="True">    2436:</span></a>         <span class="b">value</span> <span class="f">=</span> <a href="macros_ref.html#_UHlTZXF1ZW5jZV9GYXN0X0dFVF9JVEVNXzA_"><span class="b">PySequence_Fast_GET_ITEM</span></a><span class="f">(</span><span class="b">fast</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="2437" /><a href="dictobject.c.html#2437"><span class="True">    2437:</span></a>         <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2438" /><a href="dictobject.c.html#2438"><span class="True">    2438:</span></a>         <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2439" /><a href="dictobject.c.html#2439"><span class="True">    2439:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">override</span> <span class="f">||</span> <span class="b">PyDict_GetItem</span><span class="f">(</span><span class="b">d</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2440" /><a href="dictobject.c.html#2440"><span class="True">    2440:</span></a>             <span class="m">int</span> <span class="b">status</span> <span class="f">=</span> <span class="b">PyDict_SetItem</span><span class="f">(</span><span class="b">d</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2441" /><a href="dictobject.c.html#2441"><span class="True">    2441:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">status</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2442" /><a href="dictobject.c.html#2442"><span class="True">    2442:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2443" /><a href="dictobject.c.html#2443"><span class="True">    2443:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2444" /><a href="dictobject.c.html#2444"><span class="True">    2444:</span></a>                 <span class="m">goto</span> <span class="b">Fail</span><span class="f">;</span>
<a name="2445" /><a href="dictobject.c.html#2445"><span class="True">    2445:</span></a>             <span class="f">}</span>
<a name="2446" /><a href="dictobject.c.html#2446"><span class="True">    2446:</span></a>         <span class="f">}</span>
<a name="2447" /><a href="dictobject.c.html#2447"><span class="True">    2447:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2448" /><a href="dictobject.c.html#2448"><span class="True">    2448:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2449" /><a href="dictobject.c.html#2449"><span class="True">    2449:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">fast</span><span class="f">)</span><span class="f">;</span>
<a name="2450" /><a href="dictobject.c.html#2450"><span class="True">    2450:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">item</span><span class="f">)</span><span class="f">;</span>
<a name="2451" /><a href="dictobject.c.html#2451"><span class="True">    2451:</span></a>     <span class="f">}</span>
<a name="2452" /><span class="True">    2452:</span> 
<a name="2453" /><a href="dictobject.c.html#2453"><span class="True">    2453:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="2454" /><a href="dictobject.c.html#2454"><span class="True">    2454:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">d</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2455" /><a href="dictobject.c.html#2455"><span class="True">    2455:</span></a>     <span class="m">goto</span> <span class="b">Return</span><span class="f">;</span>
<a name="2456" /><a href="dictobject.c.html#2456"><span class="True">    2456:</span></a> <span class="b">Fail</span><span class="f">:</span>
<a name="2457" /><a href="dictobject.c.html#2457"><span class="True">    2457:</span></a>     <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">item</span><span class="f">)</span><span class="f">;</span>
<a name="2458" /><a href="dictobject.c.html#2458"><span class="True">    2458:</span></a>     <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">fast</span><span class="f">)</span><span class="f">;</span>
<a name="2459" /><a href="dictobject.c.html#2459"><span class="True">    2459:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2460" /><a href="dictobject.c.html#2460"><span class="True">    2460:</span></a> <span class="b">Return</span><span class="f">:</span>
<a name="2461" /><a href="dictobject.c.html#2461"><span class="True">    2461:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">;</span>
<a name="2462" /><a href="dictobject.c.html#2462"><span class="True">    2462:</span></a>     <span class="m">return</span> <a href="macros_ref.html#_UHlfU0FGRV9ET1dOQ0FTVF8w"><span class="b">Py_SAFE_DOWNCAST</span></a><span class="f">(</span><span class="b">i</span><span class="f">,</span> <span class="b">Py_ssize_t</span><span class="f">,</span> <span class="m">int</span><span class="f">)</span><span class="f">;</span>
<a name="2463" /><a href="dictobject.c.html#2463"><span class="True">    2463:</span></a> <span class="f">}</span>
<a name="2464" /><span class="True">    2464:</span> 
<a name="2465" /><a href="dictobject.c.html#2465"><span class="True">    2465:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="2466" /><a href="dictobject.c.html#2466"><span class="True">    2466:</span></a> <span class="b">dict_merge</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">a</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">b</span><span class="f">,</span> <span class="m">int</span> <span class="b">override</span><span class="f">)</span>
<a name="2467" /><a href="dictobject.c.html#2467"><span class="True">    2467:</span></a> <span class="f">{</span>
<a name="2468" /><a href="dictobject.c.html#2468"><span class="True">    2468:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="f">*</span><span class="b">other</span><span class="f">;</span>
<a name="2469" /><a href="dictobject.c.html#2469"><span class="True">    2469:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="2470" /><a href="dictobject.c.html#2470"><span class="True">    2470:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">entry</span><span class="f">,</span> <span class="f">*</span><span class="b">ep0</span><span class="f">;</span>
<a name="2471" /><span class="True">    2471:</span> 
<a name="2472" /><a href="dictobject.c.html#2472"><span class="True">    2472:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span> <span class="f">&lt;=</span> <span class="b">override</span> <span class="f">&amp;&amp;</span> <span class="b">override</span> <span class="f">&lt;=</span> <span class="c">2</span><span class="f">)</span><span class="f">;</span>
<a name="2473" /><span class="True">    2473:</span> 
<a name="2474" /><span class="True">    2474:</span>     <span class="k">/* We accept for the argument either a concrete dictionary object,</span>
<a name="2475" /><span class="True">    2475:</span> <span class="k">     * or an abstract &quot;mapping&quot; object.  For the former, we can do</span>
<a name="2476" /><span class="True">    2476:</span> <span class="k">     * things quite efficiently.  For the latter, we only require that</span>
<a name="2477" /><span class="True">    2477:</span> <span class="k">     * PyMapping_Keys() and PyObject_GetItem() be supported.</span>
<a name="2478" /><span class="True">    2478:</span> <span class="k">     */</span>
<a name="2479" /><a href="dictobject.c.html#2479"><span class="True">    2479:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">a</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">||</span> <span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">a</span><span class="f">)</span> <span class="f">||</span> <span class="b">b</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2480" /><a href="dictobject.c.html#2480"><span class="True">    2480:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2481" /><a href="dictobject.c.html#2481"><span class="True">    2481:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2482" /><a href="dictobject.c.html#2482"><span class="True">    2482:</span></a>     <span class="f">}</span>
<a name="2483" /><a href="dictobject.c.html#2483"><span class="True">    2483:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span><span class="f">*</span><span class="f">)</span><span class="b">a</span><span class="f">;</span>
<a name="2484" /><a href="dictobject.c.html#2484"><span class="True">    2484:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">b</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2485" /><a href="dictobject.c.html#2485"><span class="True">    2485:</span></a>         <span class="b">other</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span><span class="f">*</span><span class="f">)</span><span class="b">b</span><span class="f">;</span>
<a name="2486" /><a href="dictobject.c.html#2486"><span class="True">    2486:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">other</span> <span class="f">==</span> <span class="b">mp</span> <span class="f">||</span> <span class="b">other</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span>
<a name="2487" /><span class="True">    2487:</span>             <span class="k">/* a.update(a) or a.update({}); nothing to do */</span>
<a name="2488" /><a href="dictobject.c.html#2488"><span class="True">    2488:</span></a>             <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2489" /><a href="dictobject.c.html#2489"><span class="True">    2489:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span>
<a name="2490" /><span class="True">    2490:</span>             <span class="k">/* Since the target dict is empty, PyDict_GetItem()</span>
<a name="2491" /><span class="True">    2491:</span> <span class="k">             * always returns NULL.  Setting override to 1</span>
<a name="2492" /><span class="True">    2492:</span> <span class="k">             * skips the unnecessary test.</span>
<a name="2493" /><span class="True">    2493:</span> <span class="k">             */</span>
<a name="2494" /><a href="dictobject.c.html#2494"><span class="True">    2494:</span></a>             <span class="b">override</span> <span class="f">=</span> <span class="c">1</span><span class="f">;</span>
<a name="2495" /><span class="True">    2495:</span>         <span class="k">/* Do one big resize at the start, rather than</span>
<a name="2496" /><span class="True">    2496:</span> <span class="k">         * incrementally resizing as we insert new items.  Expect</span>
<a name="2497" /><span class="True">    2497:</span> <span class="k">         * that there will be no (or few) overlapping keys.</span>
<a name="2498" /><span class="True">    2498:</span> <span class="k">         */</span>
<a name="2499" /><a href="dictobject.c.html#2499"><span class="True">    2499:</span></a>         <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_size</span><span class="f">)</span> <span class="f">&lt;</span> <span class="b">other</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span> <span class="f">{</span>
<a name="2500" /><a href="dictobject.c.html#2500"><span class="True">    2500:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">dictresize</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <a href="macros_ref.html#_RVNUSU1BVEVfU0laRV8w"><span class="b">ESTIMATE_SIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">+</span> <span class="b">other</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2501" /><a href="dictobject.c.html#2501"><span class="True">    2501:</span></a>                <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2502" /><a href="dictobject.c.html#2502"><span class="True">    2502:</span></a>             <span class="f">}</span>
<a name="2503" /><a href="dictobject.c.html#2503"><span class="True">    2503:</span></a>         <span class="f">}</span>
<a name="2504" /><a href="dictobject.c.html#2504"><span class="True">    2504:</span></a>         <span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">other</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="2505" /><a href="dictobject.c.html#2505"><span class="True">    2505:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span> <span class="b">n</span> <span class="f">=</span> <span class="b">other</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="2506" /><a href="dictobject.c.html#2506"><span class="True">    2506:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="f">*</span><span class="b">value</span><span class="f">;</span>
<a name="2507" /><a href="dictobject.c.html#2507"><span class="True">    2507:</span></a>             <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="2508" /><a href="dictobject.c.html#2508"><span class="True">    2508:</span></a>             <span class="b">entry</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="2509" /><a href="dictobject.c.html#2509"><span class="True">    2509:</span></a>             <span class="b">key</span> <span class="f">=</span> <span class="b">entry</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="2510" /><a href="dictobject.c.html#2510"><span class="True">    2510:</span></a>             <span class="b">hash</span> <span class="f">=</span> <span class="b">entry</span><span class="f">-&gt;</span><span class="b">me_hash</span><span class="f">;</span>
<a name="2511" /><a href="dictobject.c.html#2511"><span class="True">    2511:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">other</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span>
<a name="2512" /><a href="dictobject.c.html#2512"><span class="True">    2512:</span></a>                 <span class="b">value</span> <span class="f">=</span> <span class="b">other</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="2513" /><a href="dictobject.c.html#2513"><span class="True">    2513:</span></a>             <span class="m">else</span>
<a name="2514" /><a href="dictobject.c.html#2514"><span class="True">    2514:</span></a>                 <span class="b">value</span> <span class="f">=</span> <span class="b">entry</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="2515" /><span class="True">    2515:</span> 
<a name="2516" /><a href="dictobject.c.html#2516"><span class="True">    2516:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2517" /><a href="dictobject.c.html#2517"><span class="True">    2517:</span></a>                 <span class="m">int</span> <span class="b">err</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="2518" /><a href="dictobject.c.html#2518"><span class="True">    2518:</span></a>                 <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2519" /><a href="dictobject.c.html#2519"><span class="True">    2519:</span></a>                 <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2520" /><a href="dictobject.c.html#2520"><span class="True">    2520:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">override</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span>
<a name="2521" /><a href="dictobject.c.html#2521"><span class="True">    2521:</span></a>                     <span class="b">err</span> <span class="f">=</span> <span class="b">insertdict</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2522" /><a href="dictobject.c.html#2522"><span class="True">    2522:</span></a>                 <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">_PyDict_GetItem_KnownHash</span><span class="f">(</span><span class="b">a</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2523" /><a href="dictobject.c.html#2523"><span class="True">    2523:</span></a>                     <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2524" /><a href="dictobject.c.html#2524"><span class="True">    2524:</span></a>                         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2525" /><a href="dictobject.c.html#2525"><span class="True">    2525:</span></a>                         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2526" /><a href="dictobject.c.html#2526"><span class="True">    2526:</span></a>                         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2527" /><a href="dictobject.c.html#2527"><span class="True">    2527:</span></a>                     <span class="f">}</span>
<a name="2528" /><a href="dictobject.c.html#2528"><span class="True">    2528:</span></a>                     <span class="b">err</span> <span class="f">=</span> <span class="b">insertdict</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2529" /><a href="dictobject.c.html#2529"><span class="True">    2529:</span></a>                 <span class="f">}</span>
<a name="2530" /><a href="dictobject.c.html#2530"><span class="True">    2530:</span></a>                 <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">override</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2531" /><a href="dictobject.c.html#2531"><span class="True">    2531:</span></a>                     <span class="b">_PyErr_SetKeyError</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2532" /><a href="dictobject.c.html#2532"><span class="True">    2532:</span></a>                     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2533" /><a href="dictobject.c.html#2533"><span class="True">    2533:</span></a>                     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2534" /><a href="dictobject.c.html#2534"><span class="True">    2534:</span></a>                     <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2535" /><a href="dictobject.c.html#2535"><span class="True">    2535:</span></a>                 <span class="f">}</span>
<a name="2536" /><a href="dictobject.c.html#2536"><span class="True">    2536:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2537" /><a href="dictobject.c.html#2537"><span class="True">    2537:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2538" /><a href="dictobject.c.html#2538"><span class="True">    2538:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">err</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span>
<a name="2539" /><a href="dictobject.c.html#2539"><span class="True">    2539:</span></a>                     <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2540" /><span class="True">    2540:</span> 
<a name="2541" /><a href="dictobject.c.html#2541"><span class="True">    2541:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">n</span> <span class="f">!=</span> <span class="b">other</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">)</span> <span class="f">{</span>
<a name="2542" /><a href="dictobject.c.html#2542"><span class="True">    2542:</span></a>                     <span class="b">PyErr_SetString</span><span class="f">(</span><span class="b">PyExc_RuntimeError</span><span class="f">,</span>
<a name="2543" /><a href="dictobject.c.html#2543"><span class="True">    2543:</span></a>                                     <span class="e">&quot;dict mutated during update&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="2544" /><a href="dictobject.c.html#2544"><span class="True">    2544:</span></a>                     <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2545" /><a href="dictobject.c.html#2545"><span class="True">    2545:</span></a>                 <span class="f">}</span>
<a name="2546" /><a href="dictobject.c.html#2546"><span class="True">    2546:</span></a>             <span class="f">}</span>
<a name="2547" /><a href="dictobject.c.html#2547"><span class="True">    2547:</span></a>         <span class="f">}</span>
<a name="2548" /><a href="dictobject.c.html#2548"><span class="True">    2548:</span></a>     <span class="f">}</span>
<a name="2549" /><a href="dictobject.c.html#2549"><span class="True">    2549:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="2550" /><span class="True">    2550:</span>         <span class="k">/* Do it the generic, slower way */</span>
<a name="2551" /><a href="dictobject.c.html#2551"><span class="True">    2551:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">keys</span> <span class="f">=</span> <span class="b">PyMapping_Keys</span><span class="f">(</span><span class="b">b</span><span class="f">)</span><span class="f">;</span>
<a name="2552" /><a href="dictobject.c.html#2552"><span class="True">    2552:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">iter</span><span class="f">;</span>
<a name="2553" /><a href="dictobject.c.html#2553"><span class="True">    2553:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="f">*</span><span class="b">value</span><span class="f">;</span>
<a name="2554" /><a href="dictobject.c.html#2554"><span class="True">    2554:</span></a>         <span class="m">int</span> <span class="b">status</span><span class="f">;</span>
<a name="2555" /><span class="True">    2555:</span> 
<a name="2556" /><a href="dictobject.c.html#2556"><span class="True">    2556:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">keys</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2557" /><span class="True">    2557:</span>             <span class="k">/* Docstring says this is equivalent to E.keys() so</span>
<a name="2558" /><span class="True">    2558:</span> <span class="k">             * if E doesn&apos;t have a .keys() method we want</span>
<a name="2559" /><span class="True">    2559:</span> <span class="k">             * AttributeError to percolate up.  Might as well</span>
<a name="2560" /><span class="True">    2560:</span> <span class="k">             * do the same for any other error.</span>
<a name="2561" /><span class="True">    2561:</span> <span class="k">             */</span>
<a name="2562" /><a href="dictobject.c.html#2562"><span class="True">    2562:</span></a>             <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2563" /><span class="True">    2563:</span> 
<a name="2564" /><a href="dictobject.c.html#2564"><span class="True">    2564:</span></a>         <span class="b">iter</span> <span class="f">=</span> <span class="b">PyObject_GetIter</span><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="2565" /><a href="dictobject.c.html#2565"><span class="True">    2565:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="2566" /><a href="dictobject.c.html#2566"><span class="True">    2566:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">iter</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2567" /><a href="dictobject.c.html#2567"><span class="True">    2567:</span></a>             <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2568" /><span class="True">    2568:</span> 
<a name="2569" /><a href="dictobject.c.html#2569"><span class="True">    2569:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">key</span> <span class="f">=</span> <span class="b">PyIter_Next</span><span class="f">(</span><span class="b">iter</span><span class="f">)</span><span class="f">;</span> <span class="b">key</span><span class="f">;</span> <span class="b">key</span> <span class="f">=</span> <span class="b">PyIter_Next</span><span class="f">(</span><span class="b">iter</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2570" /><a href="dictobject.c.html#2570"><span class="True">    2570:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">override</span> <span class="f">!=</span> <span class="c">1</span> <span class="f">&amp;&amp;</span> <span class="b">PyDict_GetItem</span><span class="f">(</span><span class="b">a</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2571" /><a href="dictobject.c.html#2571"><span class="True">    2571:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">override</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2572" /><a href="dictobject.c.html#2572"><span class="True">    2572:</span></a>                     <span class="b">_PyErr_SetKeyError</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2573" /><a href="dictobject.c.html#2573"><span class="True">    2573:</span></a>                     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2574" /><a href="dictobject.c.html#2574"><span class="True">    2574:</span></a>                     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">iter</span><span class="f">)</span><span class="f">;</span>
<a name="2575" /><a href="dictobject.c.html#2575"><span class="True">    2575:</span></a>                     <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2576" /><a href="dictobject.c.html#2576"><span class="True">    2576:</span></a>                 <span class="f">}</span>
<a name="2577" /><a href="dictobject.c.html#2577"><span class="True">    2577:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2578" /><a href="dictobject.c.html#2578"><span class="True">    2578:</span></a>                 <span class="m">continue</span><span class="f">;</span>
<a name="2579" /><a href="dictobject.c.html#2579"><span class="True">    2579:</span></a>             <span class="f">}</span>
<a name="2580" /><a href="dictobject.c.html#2580"><span class="True">    2580:</span></a>             <span class="b">value</span> <span class="f">=</span> <span class="b">PyObject_GetItem</span><span class="f">(</span><span class="b">b</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2581" /><a href="dictobject.c.html#2581"><span class="True">    2581:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2582" /><a href="dictobject.c.html#2582"><span class="True">    2582:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">iter</span><span class="f">)</span><span class="f">;</span>
<a name="2583" /><a href="dictobject.c.html#2583"><span class="True">    2583:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2584" /><a href="dictobject.c.html#2584"><span class="True">    2584:</span></a>                 <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2585" /><a href="dictobject.c.html#2585"><span class="True">    2585:</span></a>             <span class="f">}</span>
<a name="2586" /><a href="dictobject.c.html#2586"><span class="True">    2586:</span></a>             <span class="b">status</span> <span class="f">=</span> <span class="b">PyDict_SetItem</span><span class="f">(</span><span class="b">a</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2587" /><a href="dictobject.c.html#2587"><span class="True">    2587:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2588" /><a href="dictobject.c.html#2588"><span class="True">    2588:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2589" /><a href="dictobject.c.html#2589"><span class="True">    2589:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">status</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2590" /><a href="dictobject.c.html#2590"><span class="True">    2590:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">iter</span><span class="f">)</span><span class="f">;</span>
<a name="2591" /><a href="dictobject.c.html#2591"><span class="True">    2591:</span></a>                 <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2592" /><a href="dictobject.c.html#2592"><span class="True">    2592:</span></a>             <span class="f">}</span>
<a name="2593" /><a href="dictobject.c.html#2593"><span class="True">    2593:</span></a>         <span class="f">}</span>
<a name="2594" /><a href="dictobject.c.html#2594"><span class="True">    2594:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">iter</span><span class="f">)</span><span class="f">;</span>
<a name="2595" /><a href="dictobject.c.html#2595"><span class="True">    2595:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="2596" /><span class="True">    2596:</span>             <span class="k">/* Iterator completed, via error */</span>
<a name="2597" /><a href="dictobject.c.html#2597"><span class="True">    2597:</span></a>             <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2598" /><a href="dictobject.c.html#2598"><span class="True">    2598:</span></a>     <span class="f">}</span>
<a name="2599" /><a href="dictobject.c.html#2599"><span class="True">    2599:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">a</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2600" /><a href="dictobject.c.html#2600"><span class="True">    2600:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2601" /><a href="dictobject.c.html#2601"><span class="True">    2601:</span></a> <span class="f">}</span>
<a name="2602" /><span class="True">    2602:</span> 
<a name="2603" /><a href="dictobject.c.html#2603"><span class="True">    2603:</span></a> <span class="m">int</span>
<a name="2604" /><a href="dictobject.c.html#2604"><span class="True">    2604:</span></a> <span class="b">PyDict_Update</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">a</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">b</span><span class="f">)</span>
<a name="2605" /><a href="dictobject.c.html#2605"><span class="True">    2605:</span></a> <span class="f">{</span>
<a name="2606" /><a href="dictobject.c.html#2606"><span class="True">    2606:</span></a>     <span class="m">return</span> <span class="b">dict_merge</span><span class="f">(</span><span class="b">a</span><span class="f">,</span> <span class="b">b</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="2607" /><a href="dictobject.c.html#2607"><span class="True">    2607:</span></a> <span class="f">}</span>
<a name="2608" /><span class="True">    2608:</span> 
<a name="2609" /><a href="dictobject.c.html#2609"><span class="True">    2609:</span></a> <span class="m">int</span>
<a name="2610" /><a href="dictobject.c.html#2610"><span class="True">    2610:</span></a> <span class="b">PyDict_Merge</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">a</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">b</span><span class="f">,</span> <span class="m">int</span> <span class="b">override</span><span class="f">)</span>
<a name="2611" /><a href="dictobject.c.html#2611"><span class="True">    2611:</span></a> <span class="f">{</span>
<a name="2612" /><span class="True">    2612:</span>     <span class="k">/* XXX Deprecate override not in (0, 1). */</span>
<a name="2613" /><a href="dictobject.c.html#2613"><span class="True">    2613:</span></a>     <span class="m">return</span> <span class="b">dict_merge</span><span class="f">(</span><span class="b">a</span><span class="f">,</span> <span class="b">b</span><span class="f">,</span> <span class="b">override</span> <span class="f">!=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="2614" /><a href="dictobject.c.html#2614"><span class="True">    2614:</span></a> <span class="f">}</span>
<a name="2615" /><span class="True">    2615:</span> 
<a name="2616" /><a href="dictobject.c.html#2616"><span class="True">    2616:</span></a> <span class="m">int</span>
<a name="2617" /><a href="dictobject.c.html#2617"><span class="True">    2617:</span></a> <span class="b">_PyDict_MergeEx</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">a</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">b</span><span class="f">,</span> <span class="m">int</span> <span class="b">override</span><span class="f">)</span>
<a name="2618" /><a href="dictobject.c.html#2618"><span class="True">    2618:</span></a> <span class="f">{</span>
<a name="2619" /><a href="dictobject.c.html#2619"><span class="True">    2619:</span></a>     <span class="m">return</span> <span class="b">dict_merge</span><span class="f">(</span><span class="b">a</span><span class="f">,</span> <span class="b">b</span><span class="f">,</span> <span class="b">override</span><span class="f">)</span><span class="f">;</span>
<a name="2620" /><a href="dictobject.c.html#2620"><span class="True">    2620:</span></a> <span class="f">}</span>
<a name="2621" /><span class="True">    2621:</span> 
<a name="2622" /><a href="dictobject.c.html#2622"><span class="True">    2622:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2623" /><a href="dictobject.c.html#2623"><span class="True">    2623:</span></a> <span class="b">dict_copy</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2624" /><a href="dictobject.c.html#2624"><span class="True">    2624:</span></a> <span class="f">{</span>
<a name="2625" /><a href="dictobject.c.html#2625"><span class="True">    2625:</span></a>     <span class="m">return</span> <span class="b">PyDict_Copy</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span><span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2626" /><a href="dictobject.c.html#2626"><span class="True">    2626:</span></a> <span class="f">}</span>
<a name="2627" /><span class="True">    2627:</span> 
<a name="2628" /><a href="dictobject.c.html#2628"><span class="True">    2628:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2629" /><a href="dictobject.c.html#2629"><span class="True">    2629:</span></a> <span class="b">PyDict_Copy</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">o</span><span class="f">)</span>
<a name="2630" /><a href="dictobject.c.html#2630"><span class="True">    2630:</span></a> <span class="f">{</span>
<a name="2631" /><a href="dictobject.c.html#2631"><span class="True">    2631:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">copy</span><span class="f">;</span>
<a name="2632" /><a href="dictobject.c.html#2632"><span class="True">    2632:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">;</span>
<a name="2633" /><a href="dictobject.c.html#2633"><span class="True">    2633:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="2634" /><span class="True">    2634:</span> 
<a name="2635" /><a href="dictobject.c.html#2635"><span class="True">    2635:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">o</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">||</span> <span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">o</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2636" /><a href="dictobject.c.html#2636"><span class="True">    2636:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2637" /><a href="dictobject.c.html#2637"><span class="True">    2637:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2638" /><a href="dictobject.c.html#2638"><span class="True">    2638:</span></a>     <span class="f">}</span>
<a name="2639" /><a href="dictobject.c.html#2639"><span class="True">    2639:</span></a>     <span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">o</span><span class="f">;</span>
<a name="2640" /><a href="dictobject.c.html#2640"><span class="True">    2640:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2641" /><a href="dictobject.c.html#2641"><span class="True">    2641:</span></a>         <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">split_copy</span><span class="f">;</span>
<a name="2642" /><a href="dictobject.c.html#2642"><span class="True">    2642:</span></a>         <span class="b">Py_ssize_t</span> <span class="b">size</span> <span class="f">=</span> <a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2643" /><a href="dictobject.c.html#2643"><span class="True">    2643:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">newvalues</span><span class="f">;</span>
<a name="2644" /><a href="dictobject.c.html#2644"><span class="True">    2644:</span></a>         <span class="b">newvalues</span> <span class="f">=</span> <a href="macros_ref.html#_bmV3X3ZhbHVlc18w"><span class="b">new_values</span></a><span class="f">(</span><span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="2645" /><a href="dictobject.c.html#2645"><span class="True">    2645:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">newvalues</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2646" /><a href="dictobject.c.html#2646"><span class="True">    2646:</span></a>             <span class="m">return</span> <span class="b">PyErr_NoMemory</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2647" /><a href="dictobject.c.html#2647"><span class="True">    2647:</span></a>         <span class="b">split_copy</span> <span class="f">=</span> <a href="macros_ref.html#_UHlPYmplY3RfR0NfTmV3XzA_"><span class="b">PyObject_GC_New</span></a><span class="f">(</span><span class="b">PyDictObject</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyDict_Type</span><span class="f">)</span><span class="f">;</span>
<a name="2648" /><a href="dictobject.c.html#2648"><span class="True">    2648:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">split_copy</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2649" /><a href="dictobject.c.html#2649"><span class="True">    2649:</span></a>             <a href="macros_ref.html#_ZnJlZV92YWx1ZXNfMA__"><span class="b">free_values</span></a><span class="f">(</span><span class="b">newvalues</span><span class="f">)</span><span class="f">;</span>
<a name="2650" /><a href="dictobject.c.html#2650"><span class="True">    2650:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2651" /><a href="dictobject.c.html#2651"><span class="True">    2651:</span></a>         <span class="f">}</span>
<a name="2652" /><a href="dictobject.c.html#2652"><span class="True">    2652:</span></a>         <span class="b">split_copy</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">=</span> <span class="b">newvalues</span><span class="f">;</span>
<a name="2653" /><a href="dictobject.c.html#2653"><span class="True">    2653:</span></a>         <span class="b">split_copy</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="2654" /><a href="dictobject.c.html#2654"><span class="True">    2654:</span></a>         <span class="b">split_copy</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="2655" /><a href="dictobject.c.html#2655"><span class="True">    2655:</span></a>         <a href="macros_ref.html#_REtfSU5DUkVGXzA_"><span class="b">DK_INCREF</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="2656" /><a href="dictobject.c.html#2656"><span class="True">    2656:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">,</span> <span class="b">n</span> <span class="f">=</span> <span class="b">size</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="2657" /><a href="dictobject.c.html#2657"><span class="True">    2657:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="2658" /><a href="dictobject.c.html#2658"><span class="True">    2658:</span></a>             <a href="macros_ref.html#_UHlfWElOQ1JFRl8w"><span class="b">Py_XINCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2659" /><a href="dictobject.c.html#2659"><span class="True">    2659:</span></a>             <span class="b">split_copy</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="2660" /><a href="dictobject.c.html#2660"><span class="True">    2660:</span></a>         <span class="f">}</span>
<a name="2661" /><a href="dictobject.c.html#2661"><span class="True">    2661:</span></a>         <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5T2JqZWN0X0dDX0lTX1RSQUNLRURfMA__"><span class="b">_PyObject_GC_IS_TRACKED</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span>
<a name="2662" /><a href="dictobject.c.html#2662"><span class="True">    2662:</span></a>             <a href="macros_ref.html#_X1B5T2JqZWN0X0dDX1RSQUNLXzA_"><span class="b">_PyObject_GC_TRACK</span></a><span class="f">(</span><span class="b">split_copy</span><span class="f">)</span><span class="f">;</span>
<a name="2663" /><a href="dictobject.c.html#2663"><span class="True">    2663:</span></a>         <span class="m">return</span> <span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">split_copy</span><span class="f">;</span>
<a name="2664" /><a href="dictobject.c.html#2664"><span class="True">    2664:</span></a>     <span class="f">}</span>
<a name="2665" /><a href="dictobject.c.html#2665"><span class="True">    2665:</span></a>     <span class="b">copy</span> <span class="f">=</span> <span class="b">PyDict_New</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2666" /><a href="dictobject.c.html#2666"><span class="True">    2666:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">copy</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2667" /><a href="dictobject.c.html#2667"><span class="True">    2667:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2668" /><a href="dictobject.c.html#2668"><span class="True">    2668:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">PyDict_Merge</span><span class="f">(</span><span class="b">copy</span><span class="f">,</span> <span class="b">o</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span>
<a name="2669" /><a href="dictobject.c.html#2669"><span class="True">    2669:</span></a>         <span class="m">return</span> <span class="b">copy</span><span class="f">;</span>
<a name="2670" /><a href="dictobject.c.html#2670"><span class="True">    2670:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">copy</span><span class="f">)</span><span class="f">;</span>
<a name="2671" /><a href="dictobject.c.html#2671"><span class="True">    2671:</span></a>     <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2672" /><a href="dictobject.c.html#2672"><span class="True">    2672:</span></a> <span class="f">}</span>
<a name="2673" /><span class="True">    2673:</span> 
<a name="2674" /><a href="dictobject.c.html#2674"><span class="True">    2674:</span></a> <span class="b">Py_ssize_t</span>
<a name="2675" /><a href="dictobject.c.html#2675"><span class="True">    2675:</span></a> <span class="b">PyDict_Size</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2676" /><a href="dictobject.c.html#2676"><span class="True">    2676:</span></a> <span class="f">{</span>
<a name="2677" /><a href="dictobject.c.html#2677"><span class="True">    2677:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">||</span> <span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2678" /><a href="dictobject.c.html#2678"><span class="True">    2678:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2679" /><a href="dictobject.c.html#2679"><span class="True">    2679:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2680" /><a href="dictobject.c.html#2680"><span class="True">    2680:</span></a>     <span class="f">}</span>
<a name="2681" /><a href="dictobject.c.html#2681"><span class="True">    2681:</span></a>     <span class="m">return</span> <span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="2682" /><a href="dictobject.c.html#2682"><span class="True">    2682:</span></a> <span class="f">}</span>
<a name="2683" /><span class="True">    2683:</span> 
<a name="2684" /><a href="dictobject.c.html#2684"><span class="True">    2684:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2685" /><a href="dictobject.c.html#2685"><span class="True">    2685:</span></a> <span class="b">PyDict_Keys</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2686" /><a href="dictobject.c.html#2686"><span class="True">    2686:</span></a> <span class="f">{</span>
<a name="2687" /><a href="dictobject.c.html#2687"><span class="True">    2687:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">||</span> <span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2688" /><a href="dictobject.c.html#2688"><span class="True">    2688:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2689" /><a href="dictobject.c.html#2689"><span class="True">    2689:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2690" /><a href="dictobject.c.html#2690"><span class="True">    2690:</span></a>     <span class="f">}</span>
<a name="2691" /><a href="dictobject.c.html#2691"><span class="True">    2691:</span></a>     <span class="m">return</span> <span class="b">dict_keys</span><span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2692" /><a href="dictobject.c.html#2692"><span class="True">    2692:</span></a> <span class="f">}</span>
<a name="2693" /><span class="True">    2693:</span> 
<a name="2694" /><a href="dictobject.c.html#2694"><span class="True">    2694:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2695" /><a href="dictobject.c.html#2695"><span class="True">    2695:</span></a> <span class="b">PyDict_Values</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2696" /><a href="dictobject.c.html#2696"><span class="True">    2696:</span></a> <span class="f">{</span>
<a name="2697" /><a href="dictobject.c.html#2697"><span class="True">    2697:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">||</span> <span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2698" /><a href="dictobject.c.html#2698"><span class="True">    2698:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2699" /><a href="dictobject.c.html#2699"><span class="True">    2699:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2700" /><a href="dictobject.c.html#2700"><span class="True">    2700:</span></a>     <span class="f">}</span>
<a name="2701" /><a href="dictobject.c.html#2701"><span class="True">    2701:</span></a>     <span class="m">return</span> <span class="b">dict_values</span><span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2702" /><a href="dictobject.c.html#2702"><span class="True">    2702:</span></a> <span class="f">}</span>
<a name="2703" /><span class="True">    2703:</span> 
<a name="2704" /><a href="dictobject.c.html#2704"><span class="True">    2704:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2705" /><a href="dictobject.c.html#2705"><span class="True">    2705:</span></a> <span class="b">PyDict_Items</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2706" /><a href="dictobject.c.html#2706"><span class="True">    2706:</span></a> <span class="f">{</span>
<a name="2707" /><a href="dictobject.c.html#2707"><span class="True">    2707:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">||</span> <span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2708" /><a href="dictobject.c.html#2708"><span class="True">    2708:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2709" /><a href="dictobject.c.html#2709"><span class="True">    2709:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2710" /><a href="dictobject.c.html#2710"><span class="True">    2710:</span></a>     <span class="f">}</span>
<a name="2711" /><a href="dictobject.c.html#2711"><span class="True">    2711:</span></a>     <span class="m">return</span> <span class="b">dict_items</span><span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2712" /><a href="dictobject.c.html#2712"><span class="True">    2712:</span></a> <span class="f">}</span>
<a name="2713" /><span class="True">    2713:</span> 
<a name="2714" /><span class="True">    2714:</span> <span class="k">/* Return 1 if dicts equal, 0 if not, -1 if error.</span>
<a name="2715" /><span class="True">    2715:</span> <span class="k"> * Gets out as soon as any difference is detected.</span>
<a name="2716" /><span class="True">    2716:</span> <span class="k"> * Uses only Py_EQ comparison.</span>
<a name="2717" /><span class="True">    2717:</span> <span class="k"> */</span>
<a name="2718" /><a href="dictobject.c.html#2718"><span class="True">    2718:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="2719" /><a href="dictobject.c.html#2719"><span class="True">    2719:</span></a> <span class="b">dict_equal</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">a</span><span class="f">,</span> <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">b</span><span class="f">)</span>
<a name="2720" /><a href="dictobject.c.html#2720"><span class="True">    2720:</span></a> <span class="f">{</span>
<a name="2721" /><a href="dictobject.c.html#2721"><span class="True">    2721:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">;</span>
<a name="2722" /><span class="True">    2722:</span> 
<a name="2723" /><a href="dictobject.c.html#2723"><span class="True">    2723:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">a</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">!=</span> <span class="b">b</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span>
<a name="2724" /><span class="True">    2724:</span>         <span class="k">/* can&apos;t be equal if # of entries differ */</span>
<a name="2725" /><a href="dictobject.c.html#2725"><span class="True">    2725:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2726" /><span class="True">    2726:</span>     <span class="k">/* Same # of entries -- check all of &apos;em.  Exit early on any diff. */</span>
<a name="2727" /><a href="dictobject.c.html#2727"><span class="True">    2727:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">a</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="2728" /><a href="dictobject.c.html#2728"><span class="True">    2728:</span></a>         <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">a</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="2729" /><a href="dictobject.c.html#2729"><span class="True">    2729:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">aval</span><span class="f">;</span>
<a name="2730" /><a href="dictobject.c.html#2730"><span class="True">    2730:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">a</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span>
<a name="2731" /><a href="dictobject.c.html#2731"><span class="True">    2731:</span></a>             <span class="b">aval</span> <span class="f">=</span> <span class="b">a</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="2732" /><a href="dictobject.c.html#2732"><span class="True">    2732:</span></a>         <span class="m">else</span>
<a name="2733" /><a href="dictobject.c.html#2733"><span class="True">    2733:</span></a>             <span class="b">aval</span> <span class="f">=</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="2734" /><a href="dictobject.c.html#2734"><span class="True">    2734:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">aval</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2735" /><a href="dictobject.c.html#2735"><span class="True">    2735:</span></a>             <span class="m">int</span> <span class="b">cmp</span><span class="f">;</span>
<a name="2736" /><a href="dictobject.c.html#2736"><span class="True">    2736:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">bval</span><span class="f">;</span>
<a name="2737" /><a href="dictobject.c.html#2737"><span class="True">    2737:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">vaddr</span><span class="f">;</span>
<a name="2738" /><a href="dictobject.c.html#2738"><span class="True">    2738:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span> <span class="f">=</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="2739" /><span class="True">    2739:</span>             <span class="k">/* temporarily bump aval&apos;s refcount to ensure it stays</span>
<a name="2740" /><span class="True">    2740:</span> <span class="k">               alive until we&apos;re done with it */</span>
<a name="2741" /><a href="dictobject.c.html#2741"><span class="True">    2741:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">aval</span><span class="f">)</span><span class="f">;</span>
<a name="2742" /><span class="True">    2742:</span>             <span class="k">/* ditto for key */</span>
<a name="2743" /><a href="dictobject.c.html#2743"><span class="True">    2743:</span></a>             <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2744" /><span class="True">    2744:</span>             <span class="k">/* reuse the known hash value */</span>
<a name="2745" /><a href="dictobject.c.html#2745"><span class="True">    2745:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="b">b</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">b</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">vaddr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="2746" /><a href="dictobject.c.html#2746"><span class="True">    2746:</span></a>                 <span class="b">bval</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2747" /><a href="dictobject.c.html#2747"><span class="True">    2747:</span></a>             <span class="m">else</span>
<a name="2748" /><a href="dictobject.c.html#2748"><span class="True">    2748:</span></a>                 <span class="b">bval</span> <span class="f">=</span> <span class="f">*</span><span class="b">vaddr</span><span class="f">;</span>
<a name="2749" /><a href="dictobject.c.html#2749"><span class="True">    2749:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">bval</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2750" /><a href="dictobject.c.html#2750"><span class="True">    2750:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2751" /><a href="dictobject.c.html#2751"><span class="True">    2751:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">aval</span><span class="f">)</span><span class="f">;</span>
<a name="2752" /><a href="dictobject.c.html#2752"><span class="True">    2752:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="2753" /><a href="dictobject.c.html#2753"><span class="True">    2753:</span></a>                     <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="2754" /><a href="dictobject.c.html#2754"><span class="True">    2754:</span></a>                 <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="2755" /><a href="dictobject.c.html#2755"><span class="True">    2755:</span></a>             <span class="f">}</span>
<a name="2756" /><a href="dictobject.c.html#2756"><span class="True">    2756:</span></a>             <span class="b">cmp</span> <span class="f">=</span> <span class="b">PyObject_RichCompareBool</span><span class="f">(</span><span class="b">aval</span><span class="f">,</span> <span class="b">bval</span><span class="f">,</span> <a href="macros_ref.html#_UHlfRVFfMA__"><span class="b">Py_EQ</span></a><span class="f">)</span><span class="f">;</span>
<a name="2757" /><a href="dictobject.c.html#2757"><span class="True">    2757:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2758" /><a href="dictobject.c.html#2758"><span class="True">    2758:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">aval</span><span class="f">)</span><span class="f">;</span>
<a name="2759" /><a href="dictobject.c.html#2759"><span class="True">    2759:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">cmp</span> <span class="f">&lt;=</span> <span class="c">0</span><span class="f">)</span>  <span class="k">/* error or not equal */</span>
<a name="2760" /><a href="dictobject.c.html#2760"><span class="True">    2760:</span></a>                 <span class="m">return</span> <span class="b">cmp</span><span class="f">;</span>
<a name="2761" /><a href="dictobject.c.html#2761"><span class="True">    2761:</span></a>         <span class="f">}</span>
<a name="2762" /><a href="dictobject.c.html#2762"><span class="True">    2762:</span></a>     <span class="f">}</span>
<a name="2763" /><a href="dictobject.c.html#2763"><span class="True">    2763:</span></a>     <span class="m">return</span> <span class="c">1</span><span class="f">;</span>
<a name="2764" /><a href="dictobject.c.html#2764"><span class="True">    2764:</span></a> <span class="f">}</span>
<a name="2765" /><span class="True">    2765:</span> 
<a name="2766" /><a href="dictobject.c.html#2766"><span class="True">    2766:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2767" /><a href="dictobject.c.html#2767"><span class="True">    2767:</span></a> <span class="b">dict_richcompare</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">w</span><span class="f">,</span> <span class="m">int</span> <span class="b">op</span><span class="f">)</span>
<a name="2768" /><a href="dictobject.c.html#2768"><span class="True">    2768:</span></a> <span class="f">{</span>
<a name="2769" /><a href="dictobject.c.html#2769"><span class="True">    2769:</span></a>     <span class="m">int</span> <span class="b">cmp</span><span class="f">;</span>
<a name="2770" /><a href="dictobject.c.html#2770"><span class="True">    2770:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">res</span><span class="f">;</span>
<a name="2771" /><span class="True">    2771:</span> 
<a name="2772" /><a href="dictobject.c.html#2772"><span class="True">    2772:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">v</span><span class="f">)</span> <span class="f">||</span> <span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">w</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2773" /><a href="dictobject.c.html#2773"><span class="True">    2773:</span></a>         <span class="b">res</span> <span class="f">=</span> <a href="macros_ref.html#_UHlfTm90SW1wbGVtZW50ZWRfMA__"><span class="b">Py_NotImplemented</span></a><span class="f">;</span>
<a name="2774" /><a href="dictobject.c.html#2774"><span class="True">    2774:</span></a>     <span class="f">}</span>
<a name="2775" /><a href="dictobject.c.html#2775"><span class="True">    2775:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="b">op</span> <span class="f">==</span> <a href="macros_ref.html#_UHlfRVFfMA__"><span class="b">Py_EQ</span></a> <span class="f">||</span> <span class="b">op</span> <span class="f">==</span> <a href="macros_ref.html#_UHlfTkVfMA__"><span class="b">Py_NE</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2776" /><a href="dictobject.c.html#2776"><span class="True">    2776:</span></a>         <span class="b">cmp</span> <span class="f">=</span> <span class="b">dict_equal</span><span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">v</span><span class="f">,</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">w</span><span class="f">)</span><span class="f">;</span>
<a name="2777" /><a href="dictobject.c.html#2777"><span class="True">    2777:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">cmp</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="2778" /><a href="dictobject.c.html#2778"><span class="True">    2778:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2779" /><a href="dictobject.c.html#2779"><span class="True">    2779:</span></a>         <span class="b">res</span> <span class="f">=</span> <span class="f">(</span><span class="b">cmp</span> <span class="f">==</span> <span class="f">(</span><span class="b">op</span> <span class="f">==</span> <a href="macros_ref.html#_UHlfRVFfMA__"><span class="b">Py_EQ</span></a><span class="f">)</span><span class="f">)</span> <span class="f">?</span> <a href="macros_ref.html#_UHlfVHJ1ZV8w"><span class="b">Py_True</span></a> <span class="f">:</span> <a href="macros_ref.html#_UHlfRmFsc2VfMA__"><span class="b">Py_False</span></a><span class="f">;</span>
<a name="2780" /><a href="dictobject.c.html#2780"><span class="True">    2780:</span></a>     <span class="f">}</span>
<a name="2781" /><a href="dictobject.c.html#2781"><span class="True">    2781:</span></a>     <span class="m">else</span>
<a name="2782" /><a href="dictobject.c.html#2782"><span class="True">    2782:</span></a>         <span class="b">res</span> <span class="f">=</span> <a href="macros_ref.html#_UHlfTm90SW1wbGVtZW50ZWRfMA__"><span class="b">Py_NotImplemented</span></a><span class="f">;</span>
<a name="2783" /><a href="dictobject.c.html#2783"><span class="True">    2783:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">res</span><span class="f">)</span><span class="f">;</span>
<a name="2784" /><a href="dictobject.c.html#2784"><span class="True">    2784:</span></a>     <span class="m">return</span> <span class="b">res</span><span class="f">;</span>
<a name="2785" /><a href="dictobject.c.html#2785"><span class="True">    2785:</span></a> <span class="f">}</span>
<a name="2786" /><span class="True">    2786:</span> 
<a name="2787" /><span class="True">    2787:</span> <span class="k">/*[clinic input]</span>
<a name="2788" /><span class="True">    2788:</span> <span class="k"></span>
<a name="2789" /><span class="True">    2789:</span> <span class="k">@coexist</span>
<a name="2790" /><span class="True">    2790:</span> <span class="k">dict.__contains__</span>
<a name="2791" /><span class="True">    2791:</span> <span class="k"></span>
<a name="2792" /><span class="True">    2792:</span> <span class="k">  key: object</span>
<a name="2793" /><span class="True">    2793:</span> <span class="k">  /</span>
<a name="2794" /><span class="True">    2794:</span> <span class="k"></span>
<a name="2795" /><span class="True">    2795:</span> <span class="k">True if D has a key k, else False.</span>
<a name="2796" /><span class="True">    2796:</span> <span class="k">[clinic start generated code]*/</span>
<a name="2797" /><span class="True">    2797:</span> 
<a name="2798" /><a href="dictobject.c.html#2798"><span class="True">    2798:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2799" /><a href="dictobject.c.html#2799"><span class="True">    2799:</span></a> <span class="b">dict___contains__</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="2800" /><span class="True">    2800:</span> <span class="k">/*[clinic end generated code: output=a3d03db709ed6e6b input=b852b2a19b51ab24]*/</span>
<a name="2801" /><a href="dictobject.c.html#2801"><span class="True">    2801:</span></a> <span class="f">{</span>
<a name="2802" /><a href="dictobject.c.html#2802"><span class="True">    2802:</span></a>     <span class="m">register</span> <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="b">self</span><span class="f">;</span>
<a name="2803" /><a href="dictobject.c.html#2803"><span class="True">    2803:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="2804" /><a href="dictobject.c.html#2804"><span class="True">    2804:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="2805" /><a href="dictobject.c.html#2805"><span class="True">    2805:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="2806" /><span class="True">    2806:</span> 
<a name="2807" /><a href="dictobject.c.html#2807"><span class="True">    2807:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="2808" /><a href="dictobject.c.html#2808"><span class="True">    2808:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="2809" /><a href="dictobject.c.html#2809"><span class="True">    2809:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2810" /><a href="dictobject.c.html#2810"><span class="True">    2810:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="2811" /><a href="dictobject.c.html#2811"><span class="True">    2811:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2812" /><a href="dictobject.c.html#2812"><span class="True">    2812:</span></a>     <span class="f">}</span>
<a name="2813" /><a href="dictobject.c.html#2813"><span class="True">    2813:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="2814" /><a href="dictobject.c.html#2814"><span class="True">    2814:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="2815" /><a href="dictobject.c.html#2815"><span class="True">    2815:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2816" /><a href="dictobject.c.html#2816"><span class="True">    2816:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">||</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2817" /><a href="dictobject.c.html#2817"><span class="True">    2817:</span></a>         <a href="macros_ref.html#_UHlfUkVUVVJOX0ZBTFNFXzA_"><span class="b">Py_RETURN_FALSE</span></a><span class="f">;</span>
<a name="2818" /><a href="dictobject.c.html#2818"><span class="True">    2818:</span></a>     <a href="macros_ref.html#_UHlfUkVUVVJOX1RSVUVfMA__"><span class="b">Py_RETURN_TRUE</span></a><span class="f">;</span>
<a name="2819" /><a href="dictobject.c.html#2819"><span class="True">    2819:</span></a> <span class="f">}</span>
<a name="2820" /><span class="True">    2820:</span> 
<a name="2821" /><a href="dictobject.c.html#2821"><span class="True">    2821:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2822" /><a href="dictobject.c.html#2822"><span class="True">    2822:</span></a> <span class="b">dict_get</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">args</span><span class="f">)</span>
<a name="2823" /><a href="dictobject.c.html#2823"><span class="True">    2823:</span></a> <span class="f">{</span>
<a name="2824" /><a href="dictobject.c.html#2824"><span class="True">    2824:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">;</span>
<a name="2825" /><a href="dictobject.c.html#2825"><span class="True">    2825:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">failobj</span> <span class="f">=</span> <a href="macros_ref.html#_UHlfTm9uZV8w"><span class="b">Py_None</span></a><span class="f">;</span>
<a name="2826" /><a href="dictobject.c.html#2826"><span class="True">    2826:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">val</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2827" /><a href="dictobject.c.html#2827"><span class="True">    2827:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="2828" /><a href="dictobject.c.html#2828"><span class="True">    2828:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="2829" /><a href="dictobject.c.html#2829"><span class="True">    2829:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="2830" /><span class="True">    2830:</span> 
<a name="2831" /><a href="dictobject.c.html#2831"><span class="True">    2831:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">PyArg_UnpackTuple</span><span class="f">(</span><span class="b">args</span><span class="f">,</span> <span class="e">&quot;get&quot;</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">key</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">failobj</span><span class="f">)</span><span class="f">)</span>
<a name="2832" /><a href="dictobject.c.html#2832"><span class="True">    2832:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2833" /><span class="True">    2833:</span> 
<a name="2834" /><a href="dictobject.c.html#2834"><span class="True">    2834:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="2835" /><a href="dictobject.c.html#2835"><span class="True">    2835:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="2836" /><a href="dictobject.c.html#2836"><span class="True">    2836:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2837" /><a href="dictobject.c.html#2837"><span class="True">    2837:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="2838" /><a href="dictobject.c.html#2838"><span class="True">    2838:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2839" /><a href="dictobject.c.html#2839"><span class="True">    2839:</span></a>     <span class="f">}</span>
<a name="2840" /><a href="dictobject.c.html#2840"><span class="True">    2840:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="2841" /><a href="dictobject.c.html#2841"><span class="True">    2841:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="2842" /><a href="dictobject.c.html#2842"><span class="True">    2842:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2843" /><a href="dictobject.c.html#2843"><span class="True">    2843:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">||</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2844" /><a href="dictobject.c.html#2844"><span class="True">    2844:</span></a>         <span class="b">val</span> <span class="f">=</span> <span class="b">failobj</span><span class="f">;</span>
<a name="2845" /><a href="dictobject.c.html#2845"><span class="True">    2845:</span></a>     <span class="m">else</span>
<a name="2846" /><a href="dictobject.c.html#2846"><span class="True">    2846:</span></a>         <span class="b">val</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="2847" /><a href="dictobject.c.html#2847"><span class="True">    2847:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="2848" /><a href="dictobject.c.html#2848"><span class="True">    2848:</span></a>     <span class="m">return</span> <span class="b">val</span><span class="f">;</span>
<a name="2849" /><a href="dictobject.c.html#2849"><span class="True">    2849:</span></a> <span class="f">}</span>
<a name="2850" /><span class="True">    2850:</span> 
<a name="2851" /><a href="dictobject.c.html#2851"><span class="True">    2851:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2852" /><a href="dictobject.c.html#2852"><span class="True">    2852:</span></a> <span class="b">PyDict_SetDefault</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">d</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">defaultobj</span><span class="f">)</span>
<a name="2853" /><a href="dictobject.c.html#2853"><span class="True">    2853:</span></a> <span class="f">{</span>
<a name="2854" /><a href="dictobject.c.html#2854"><span class="True">    2854:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">d</span><span class="f">;</span>
<a name="2855" /><a href="dictobject.c.html#2855"><span class="True">    2855:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">;</span>
<a name="2856" /><a href="dictobject.c.html#2856"><span class="True">    2856:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="2857" /><a href="dictobject.c.html#2857"><span class="True">    2857:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">hashpos</span><span class="f">,</span> <span class="b">ix</span><span class="f">;</span>
<a name="2858" /><a href="dictobject.c.html#2858"><span class="True">    2858:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="2859" /><span class="True">    2859:</span> 
<a name="2860" /><a href="dictobject.c.html#2860"><span class="True">    2860:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2861" /><a href="dictobject.c.html#2861"><span class="True">    2861:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2862" /><a href="dictobject.c.html#2862"><span class="True">    2862:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2863" /><a href="dictobject.c.html#2863"><span class="True">    2863:</span></a>     <span class="f">}</span>
<a name="2864" /><span class="True">    2864:</span> 
<a name="2865" /><a href="dictobject.c.html#2865"><span class="True">    2865:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="2866" /><a href="dictobject.c.html#2866"><span class="True">    2866:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="2867" /><a href="dictobject.c.html#2867"><span class="True">    2867:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2868" /><a href="dictobject.c.html#2868"><span class="True">    2868:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="2869" /><a href="dictobject.c.html#2869"><span class="True">    2869:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2870" /><a href="dictobject.c.html#2870"><span class="True">    2870:</span></a>     <span class="f">}</span>
<a name="2871" /><span class="True">    2871:</span> 
<a name="2872" /><a href="dictobject.c.html#2872"><span class="True">    2872:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2873" /><a href="dictobject.c.html#2873"><span class="True">    2873:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">insertion_resize</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="2874" /><a href="dictobject.c.html#2874"><span class="True">    2874:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2875" /><a href="dictobject.c.html#2875"><span class="True">    2875:</span></a>     <span class="f">}</span>
<a name="2876" /><span class="True">    2876:</span> 
<a name="2877" /><a href="dictobject.c.html#2877"><span class="True">    2877:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="2878" /><a href="dictobject.c.html#2878"><span class="True">    2878:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="2879" /><a href="dictobject.c.html#2879"><span class="True">    2879:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2880" /><span class="True">    2880:</span> 
<a name="2881" /><a href="dictobject.c.html#2881"><span class="True">    2881:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">&amp;&amp;</span>
<a name="2882" /><a href="dictobject.c.html#2882"><span class="True">    2882:</span></a>         <span class="f">(</span><span class="f">(</span><span class="b">ix</span> <span class="f">&gt;=</span> <span class="c">0</span> <span class="f">&amp;&amp;</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">!=</span> <span class="b">ix</span><span class="f">)</span> <span class="f">||</span>
<a name="2883" /><a href="dictobject.c.html#2883"><span class="True">    2883:</span></a>          <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">&amp;&amp;</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">!=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2884" /><a href="dictobject.c.html#2884"><span class="True">    2884:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">insertion_resize</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2885" /><a href="dictobject.c.html#2885"><span class="True">    2885:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2886" /><a href="dictobject.c.html#2886"><span class="True">    2886:</span></a>         <span class="f">}</span>
<a name="2887" /><a href="dictobject.c.html#2887"><span class="True">    2887:</span></a>         <span class="b">find_empty_slot</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="2888" /><a href="dictobject.c.html#2888"><span class="True">    2888:</span></a>         <span class="b">ix</span> <span class="f">=</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">;</span>
<a name="2889" /><a href="dictobject.c.html#2889"><span class="True">    2889:</span></a>     <span class="f">}</span>
<a name="2890" /><span class="True">    2890:</span> 
<a name="2891" /><a href="dictobject.c.html#2891"><span class="True">    2891:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2892" /><a href="dictobject.c.html#2892"><span class="True">    2892:</span></a>         <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep</span><span class="f">,</span> <span class="f">*</span><span class="b">ep0</span><span class="f">;</span>
<a name="2893" /><a href="dictobject.c.html#2893"><span class="True">    2893:</span></a>         <span class="b">value</span> <span class="f">=</span> <span class="b">defaultobj</span><span class="f">;</span>
<a name="2894" /><a href="dictobject.c.html#2894"><span class="True">    2894:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span> <span class="f">&lt;=</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2895" /><a href="dictobject.c.html#2895"><span class="True">    2895:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">insertion_resize</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2896" /><a href="dictobject.c.html#2896"><span class="True">    2896:</span></a>                 <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2897" /><a href="dictobject.c.html#2897"><span class="True">    2897:</span></a>             <span class="f">}</span>
<a name="2898" /><a href="dictobject.c.html#2898"><span class="True">    2898:</span></a>             <span class="b">find_empty_slot</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">hashpos</span><span class="f">)</span><span class="f">;</span>
<a name="2899" /><a href="dictobject.c.html#2899"><span class="True">    2899:</span></a>         <span class="f">}</span>
<a name="2900" /><a href="dictobject.c.html#2900"><span class="True">    2900:</span></a>         <span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="2901" /><a href="dictobject.c.html#2901"><span class="True">    2901:</span></a>         <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">]</span><span class="f">;</span>
<a name="2902" /><a href="dictobject.c.html#2902"><span class="True">    2902:</span></a>         <span class="b">dk_set_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">hashpos</span><span class="f">,</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">)</span><span class="f">;</span>
<a name="2903" /><a href="dictobject.c.html#2903"><span class="True">    2903:</span></a>         <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="2904" /><a href="dictobject.c.html#2904"><span class="True">    2904:</span></a>         <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2905" /><a href="dictobject.c.html#2905"><span class="True">    2905:</span></a>         <a href="macros_ref.html#_TUFJTlRBSU5fVFJBQ0tJTkdfMA__"><span class="b">MAINTAIN_TRACKING</span></a><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2906" /><a href="dictobject.c.html#2906"><span class="True">    2906:</span></a>         <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">=</span> <span class="b">key</span><span class="f">;</span>
<a name="2907" /><a href="dictobject.c.html#2907"><span class="True">    2907:</span></a>         <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span> <span class="f">=</span> <span class="b">hash</span><span class="f">;</span>
<a name="2908" /><a href="dictobject.c.html#2908"><span class="True">    2908:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span> <span class="f">{</span>
<a name="2909" /><a href="dictobject.c.html#2909"><span class="True">    2909:</span></a>             <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">]</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="2910" /><a href="dictobject.c.html#2910"><span class="True">    2910:</span></a>             <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">]</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="2911" /><a href="dictobject.c.html#2911"><span class="True">    2911:</span></a>         <span class="f">}</span>
<a name="2912" /><a href="dictobject.c.html#2912"><span class="True">    2912:</span></a>         <span class="m">else</span> <span class="f">{</span>
<a name="2913" /><a href="dictobject.c.html#2913"><span class="True">    2913:</span></a>             <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="2914" /><a href="dictobject.c.html#2914"><span class="True">    2914:</span></a>         <span class="f">}</span>
<a name="2915" /><a href="dictobject.c.html#2915"><span class="True">    2915:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">++</span><span class="f">;</span>
<a name="2916" /><a href="dictobject.c.html#2916"><span class="True">    2916:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2917" /><a href="dictobject.c.html#2917"><span class="True">    2917:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span><span class="f">--</span><span class="f">;</span>
<a name="2918" /><a href="dictobject.c.html#2918"><span class="True">    2918:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">++</span><span class="f">;</span>
<a name="2919" /><a href="dictobject.c.html#2919"><span class="True">    2919:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_usable</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="2920" /><a href="dictobject.c.html#2920"><span class="True">    2920:</span></a>     <span class="f">}</span>
<a name="2921" /><a href="dictobject.c.html#2921"><span class="True">    2921:</span></a>     <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><span class="f">*</span><span class="b">value_addr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="2922" /><a href="dictobject.c.html#2922"><span class="True">    2922:</span></a>         <span class="b">value</span> <span class="f">=</span> <span class="b">defaultobj</span><span class="f">;</span>
<a name="2923" /><a href="dictobject.c.html#2923"><span class="True">    2923:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_X1B5RGljdF9IYXNTcGxpdFRhYmxlXzA_"><span class="b">_PyDict_HasSplitTable</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2924" /><a href="dictobject.c.html#2924"><span class="True">    2924:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span><span class="f">;</span>
<a name="2925" /><a href="dictobject.c.html#2925"><span class="True">    2925:</span></a>         <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2926" /><a href="dictobject.c.html#2926"><span class="True">    2926:</span></a>         <a href="macros_ref.html#_TUFJTlRBSU5fVFJBQ0tJTkdfMA__"><span class="b">MAINTAIN_TRACKING</span></a><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="2927" /><a href="dictobject.c.html#2927"><span class="True">    2927:</span></a>         <span class="f">*</span><span class="b">value_addr</span> <span class="f">=</span> <span class="b">value</span><span class="f">;</span>
<a name="2928" /><a href="dictobject.c.html#2928"><span class="True">    2928:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">++</span><span class="f">;</span>
<a name="2929" /><a href="dictobject.c.html#2929"><span class="True">    2929:</span></a>         <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="2930" /><a href="dictobject.c.html#2930"><span class="True">    2930:</span></a>     <span class="f">}</span>
<a name="2931" /><a href="dictobject.c.html#2931"><span class="True">    2931:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="2932" /><a href="dictobject.c.html#2932"><span class="True">    2932:</span></a>         <span class="b">value</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="2933" /><a href="dictobject.c.html#2933"><span class="True">    2933:</span></a>     <span class="f">}</span>
<a name="2934" /><span class="True">    2934:</span> 
<a name="2935" /><a href="dictobject.c.html#2935"><span class="True">    2935:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="2936" /><a href="dictobject.c.html#2936"><span class="True">    2936:</span></a>     <span class="m">return</span> <span class="b">value</span><span class="f">;</span>
<a name="2937" /><a href="dictobject.c.html#2937"><span class="True">    2937:</span></a> <span class="f">}</span>
<a name="2938" /><span class="True">    2938:</span> 
<a name="2939" /><a href="dictobject.c.html#2939"><span class="True">    2939:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2940" /><a href="dictobject.c.html#2940"><span class="True">    2940:</span></a> <span class="b">dict_setdefault</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">args</span><span class="f">)</span>
<a name="2941" /><a href="dictobject.c.html#2941"><span class="True">    2941:</span></a> <span class="f">{</span>
<a name="2942" /><a href="dictobject.c.html#2942"><span class="True">    2942:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="f">*</span><span class="b">val</span><span class="f">;</span>
<a name="2943" /><a href="dictobject.c.html#2943"><span class="True">    2943:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">defaultobj</span> <span class="f">=</span> <a href="macros_ref.html#_UHlfTm9uZV8w"><span class="b">Py_None</span></a><span class="f">;</span>
<a name="2944" /><span class="True">    2944:</span> 
<a name="2945" /><a href="dictobject.c.html#2945"><span class="True">    2945:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">PyArg_UnpackTuple</span><span class="f">(</span><span class="b">args</span><span class="f">,</span> <span class="e">&quot;setdefault&quot;</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">key</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">defaultobj</span><span class="f">)</span><span class="f">)</span>
<a name="2946" /><a href="dictobject.c.html#2946"><span class="True">    2946:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2947" /><span class="True">    2947:</span> 
<a name="2948" /><a href="dictobject.c.html#2948"><span class="True">    2948:</span></a>     <span class="b">val</span> <span class="f">=</span> <span class="b">PyDict_SetDefault</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">defaultobj</span><span class="f">)</span><span class="f">;</span>
<a name="2949" /><a href="dictobject.c.html#2949"><span class="True">    2949:</span></a>     <a href="macros_ref.html#_UHlfWElOQ1JFRl8w"><span class="b">Py_XINCREF</span></a><span class="f">(</span><span class="b">val</span><span class="f">)</span><span class="f">;</span>
<a name="2950" /><a href="dictobject.c.html#2950"><span class="True">    2950:</span></a>     <span class="m">return</span> <span class="b">val</span><span class="f">;</span>
<a name="2951" /><a href="dictobject.c.html#2951"><span class="True">    2951:</span></a> <span class="f">}</span>
<a name="2952" /><span class="True">    2952:</span> 
<a name="2953" /><a href="dictobject.c.html#2953"><span class="True">    2953:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2954" /><a href="dictobject.c.html#2954"><span class="True">    2954:</span></a> <span class="b">dict_clear</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2955" /><a href="dictobject.c.html#2955"><span class="True">    2955:</span></a> <span class="f">{</span>
<a name="2956" /><a href="dictobject.c.html#2956"><span class="True">    2956:</span></a>     <span class="b">PyDict_Clear</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="2957" /><a href="dictobject.c.html#2957"><span class="True">    2957:</span></a>     <a href="macros_ref.html#_UHlfUkVUVVJOX05PTkVfMA__"><span class="b">Py_RETURN_NONE</span></a><span class="f">;</span>
<a name="2958" /><a href="dictobject.c.html#2958"><span class="True">    2958:</span></a> <span class="f">}</span>
<a name="2959" /><span class="True">    2959:</span> 
<a name="2960" /><a href="dictobject.c.html#2960"><span class="True">    2960:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2961" /><a href="dictobject.c.html#2961"><span class="True">    2961:</span></a> <span class="b">dict_pop</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">args</span><span class="f">)</span>
<a name="2962" /><a href="dictobject.c.html#2962"><span class="True">    2962:</span></a> <span class="f">{</span>
<a name="2963" /><a href="dictobject.c.html#2963"><span class="True">    2963:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="f">*</span><span class="b">deflt</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2964" /><span class="True">    2964:</span> 
<a name="2965" /><a href="dictobject.c.html#2965"><span class="True">    2965:</span></a>     <span class="m">if</span><span class="f">(</span><span class="f">!</span><span class="b">PyArg_UnpackTuple</span><span class="f">(</span><span class="b">args</span><span class="f">,</span> <span class="e">&quot;pop&quot;</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">key</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">deflt</span><span class="f">)</span><span class="f">)</span>
<a name="2966" /><a href="dictobject.c.html#2966"><span class="True">    2966:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2967" /><span class="True">    2967:</span> 
<a name="2968" /><a href="dictobject.c.html#2968"><span class="True">    2968:</span></a>     <span class="m">return</span> <span class="b">_PyDict_Pop</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span><span class="f">*</span><span class="f">)</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">deflt</span><span class="f">)</span><span class="f">;</span>
<a name="2969" /><a href="dictobject.c.html#2969"><span class="True">    2969:</span></a> <span class="f">}</span>
<a name="2970" /><span class="True">    2970:</span> 
<a name="2971" /><a href="dictobject.c.html#2971"><span class="True">    2971:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="2972" /><a href="dictobject.c.html#2972"><span class="True">    2972:</span></a> <span class="b">dict_popitem</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="2973" /><a href="dictobject.c.html#2973"><span class="True">    2973:</span></a> <span class="f">{</span>
<a name="2974" /><a href="dictobject.c.html#2974"><span class="True">    2974:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">j</span><span class="f">;</span>
<a name="2975" /><a href="dictobject.c.html#2975"><span class="True">    2975:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">ep0</span><span class="f">,</span> <span class="f">*</span><span class="b">ep</span><span class="f">;</span>
<a name="2976" /><a href="dictobject.c.html#2976"><span class="True">    2976:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">res</span><span class="f">;</span>
<a name="2977" /><span class="True">    2977:</span> 
<a name="2978" /><span class="True">    2978:</span>     <span class="k">/* Allocate the result tuple before checking the size.  Believe it</span>
<a name="2979" /><span class="True">    2979:</span> <span class="k">     * or not, this allocation could trigger a garbage collection which</span>
<a name="2980" /><span class="True">    2980:</span> <span class="k">     * could empty the dict, so if we checked the size first and that</span>
<a name="2981" /><span class="True">    2981:</span> <span class="k">     * happened, the result would be an infinite loop (searching for an</span>
<a name="2982" /><span class="True">    2982:</span> <span class="k">     * entry that no longer exists).  Note that the usual popitem()</span>
<a name="2983" /><span class="True">    2983:</span> <span class="k">     * idiom is &quot;while d: k, v = d.popitem()&quot;. so needing to throw the</span>
<a name="2984" /><span class="True">    2984:</span> <span class="k">     * tuple away if the dict *is* empty isn&apos;t a significant</span>
<a name="2985" /><span class="True">    2985:</span> <span class="k">     * inefficiency -- possible, but unlikely in practice.</span>
<a name="2986" /><span class="True">    2986:</span> <span class="k">     */</span>
<a name="2987" /><a href="dictobject.c.html#2987"><span class="True">    2987:</span></a>     <span class="b">res</span> <span class="f">=</span> <span class="b">PyTuple_New</span><span class="f">(</span><span class="c">2</span><span class="f">)</span><span class="f">;</span>
<a name="2988" /><a href="dictobject.c.html#2988"><span class="True">    2988:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">res</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="2989" /><a href="dictobject.c.html#2989"><span class="True">    2989:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2990" /><a href="dictobject.c.html#2990"><span class="True">    2990:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span> <span class="f">{</span>
<a name="2991" /><a href="dictobject.c.html#2991"><span class="True">    2991:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">res</span><span class="f">)</span><span class="f">;</span>
<a name="2992" /><a href="dictobject.c.html#2992"><span class="True">    2992:</span></a>         <span class="b">PyErr_SetString</span><span class="f">(</span><span class="b">PyExc_KeyError</span><span class="f">,</span>
<a name="2993" /><a href="dictobject.c.html#2993"><span class="True">    2993:</span></a>                         <span class="e">&quot;popitem(): dictionary is empty&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="2994" /><a href="dictobject.c.html#2994"><span class="True">    2994:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="2995" /><a href="dictobject.c.html#2995"><span class="True">    2995:</span></a>     <span class="f">}</span>
<a name="2996" /><span class="True">    2996:</span>     <span class="k">/* Convert split table to combined table */</span>
<a name="2997" /><a href="dictobject.c.html#2997"><span class="True">    2997:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">==</span> <span class="b">lookdict_split</span><span class="f">)</span> <span class="f">{</span>
<a name="2998" /><a href="dictobject.c.html#2998"><span class="True">    2998:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">dictresize</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="2999" /><a href="dictobject.c.html#2999"><span class="True">    2999:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">res</span><span class="f">)</span><span class="f">;</span>
<a name="3000" /><a href="dictobject.c.html#3000"><span class="True">    3000:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3001" /><a href="dictobject.c.html#3001"><span class="True">    3001:</span></a>         <span class="f">}</span>
<a name="3002" /><a href="dictobject.c.html#3002"><span class="True">    3002:</span></a>     <span class="f">}</span>
<a name="3003" /><a href="dictobject.c.html#3003"><span class="True">    3003:</span></a>     <a href="macros_ref.html#_RU5TVVJFX0FMTE9XU19ERUxFVElPTlNfMA__"><span class="b">ENSURE_ALLOWS_DELETIONS</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">;</span>
<a name="3004" /><span class="True">    3004:</span> 
<a name="3005" /><span class="True">    3005:</span>     <span class="k">/* Pop last item */</span>
<a name="3006" /><a href="dictobject.c.html#3006"><span class="True">    3006:</span></a>     <span class="b">ep0</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="3007" /><a href="dictobject.c.html#3007"><span class="True">    3007:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span> <span class="f">-</span> <span class="c">1</span><span class="f">;</span>
<a name="3008" /><a href="dictobject.c.html#3008"><span class="True">    3008:</span></a>     <span class="m">while</span> <span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="c">0</span> <span class="f">&amp;&amp;</span> <span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3009" /><a href="dictobject.c.html#3009"><span class="True">    3009:</span></a>         <span class="b">i</span><span class="f">--</span><span class="f">;</span>
<a name="3010" /><a href="dictobject.c.html#3010"><span class="True">    3010:</span></a>     <span class="f">}</span>
<a name="3011" /><a href="dictobject.c.html#3011"><span class="True">    3011:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="3012" /><span class="True">    3012:</span> 
<a name="3013" /><a href="dictobject.c.html#3013"><span class="True">    3013:</span></a>     <span class="b">ep</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">ep0</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="3014" /><a href="dictobject.c.html#3014"><span class="True">    3014:</span></a>     <span class="b">j</span> <span class="f">=</span> <span class="b">lookdict_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_hash</span><span class="f">,</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="3015" /><a href="dictobject.c.html#3015"><span class="True">    3015:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">j</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="3016" /><a href="dictobject.c.html#3016"><span class="True">    3016:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">dk_get_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">j</span><span class="f">)</span> <span class="f">==</span> <span class="b">i</span><span class="f">)</span><span class="f">;</span>
<a name="3017" /><a href="dictobject.c.html#3017"><span class="True">    3017:</span></a>     <span class="b">dk_set_index</span><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">,</span> <span class="b">j</span><span class="f">,</span> <a href="macros_ref.html#_REtJWF9EVU1NWV8w"><span class="b">DKIX_DUMMY</span></a><span class="f">)</span><span class="f">;</span>
<a name="3018" /><span class="True">    3018:</span> 
<a name="3019" /><a href="dictobject.c.html#3019"><span class="True">    3019:</span></a>     <a href="macros_ref.html#_UHlUdXBsZV9TRVRfSVRFTV8w"><span class="b">PyTuple_SET_ITEM</span></a><span class="f">(</span><span class="b">res</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">)</span><span class="f">;</span>
<a name="3020" /><a href="dictobject.c.html#3020"><span class="True">    3020:</span></a>     <a href="macros_ref.html#_UHlUdXBsZV9TRVRfSVRFTV8w"><span class="b">PyTuple_SET_ITEM</span></a><span class="f">(</span><span class="b">res</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">)</span><span class="f">;</span>
<a name="3021" /><a href="dictobject.c.html#3021"><span class="True">    3021:</span></a>     <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_key</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3022" /><a href="dictobject.c.html#3022"><span class="True">    3022:</span></a>     <span class="b">ep</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3023" /><span class="True">    3023:</span>     <span class="k">/* We can&apos;t dk_usable++ since there is DKIX_DUMMY in indices */</span>
<a name="3024" /><a href="dictobject.c.html#3024"><span class="True">    3024:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span> <span class="f">=</span> <span class="b">i</span><span class="f">;</span>
<a name="3025" /><a href="dictobject.c.html#3025"><span class="True">    3025:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">--</span><span class="f">;</span>
<a name="3026" /><a href="dictobject.c.html#3026"><span class="True">    3026:</span></a>     <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="3027" /><a href="dictobject.c.html#3027"><span class="True">    3027:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="3028" /><a href="dictobject.c.html#3028"><span class="True">    3028:</span></a>     <span class="m">return</span> <span class="b">res</span><span class="f">;</span>
<a name="3029" /><a href="dictobject.c.html#3029"><span class="True">    3029:</span></a> <span class="f">}</span>
<a name="3030" /><span class="True">    3030:</span> 
<a name="3031" /><a href="dictobject.c.html#3031"><span class="True">    3031:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="3032" /><a href="dictobject.c.html#3032"><span class="True">    3032:</span></a> <span class="b">dict_traverse</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">visitproc</span> <span class="b">visit</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">arg</span><span class="f">)</span>
<a name="3033" /><a href="dictobject.c.html#3033"><span class="True">    3033:</span></a> <span class="f">{</span>
<a name="3034" /><a href="dictobject.c.html#3034"><span class="True">    3034:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="3035" /><a href="dictobject.c.html#3035"><span class="True">    3035:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span> <span class="f">=</span> <span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="3036" /><a href="dictobject.c.html#3036"><span class="True">    3036:</span></a>     <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">entries</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="3037" /><a href="dictobject.c.html#3037"><span class="True">    3037:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span> <span class="f">=</span> <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="3038" /><span class="True">    3038:</span> 
<a name="3039" /><a href="dictobject.c.html#3039"><span class="True">    3039:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">==</span> <span class="b">lookdict</span><span class="f">)</span> <span class="f">{</span>
<a name="3040" /><a href="dictobject.c.html#3040"><span class="True">    3040:</span></a>         <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="3041" /><a href="dictobject.c.html#3041"><span class="True">    3041:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">entries</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3042" /><a href="dictobject.c.html#3042"><span class="True">    3042:</span></a>                 <a href="macros_ref.html#_UHlfVklTSVRfMA__"><span class="b">Py_VISIT</span></a><span class="f">(</span><span class="b">entries</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span><span class="f">)</span><span class="f">;</span>
<a name="3043" /><a href="dictobject.c.html#3043"><span class="True">    3043:</span></a>                 <a href="macros_ref.html#_UHlfVklTSVRfMA__"><span class="b">Py_VISIT</span></a><span class="f">(</span><span class="b">entries</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_key</span><span class="f">)</span><span class="f">;</span>
<a name="3044" /><a href="dictobject.c.html#3044"><span class="True">    3044:</span></a>             <span class="f">}</span>
<a name="3045" /><a href="dictobject.c.html#3045"><span class="True">    3045:</span></a>         <span class="f">}</span>
<a name="3046" /><a href="dictobject.c.html#3046"><span class="True">    3046:</span></a>     <span class="f">}</span>
<a name="3047" /><a href="dictobject.c.html#3047"><span class="True">    3047:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="3048" /><a href="dictobject.c.html#3048"><span class="True">    3048:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3049" /><a href="dictobject.c.html#3049"><span class="True">    3049:</span></a>             <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="3050" /><a href="dictobject.c.html#3050"><span class="True">    3050:</span></a>                 <a href="macros_ref.html#_UHlfVklTSVRfMA__"><span class="b">Py_VISIT</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">)</span><span class="f">;</span>
<a name="3051" /><a href="dictobject.c.html#3051"><span class="True">    3051:</span></a>             <span class="f">}</span>
<a name="3052" /><a href="dictobject.c.html#3052"><span class="True">    3052:</span></a>         <span class="f">}</span>
<a name="3053" /><a href="dictobject.c.html#3053"><span class="True">    3053:</span></a>         <span class="m">else</span> <span class="f">{</span>
<a name="3054" /><a href="dictobject.c.html#3054"><span class="True">    3054:</span></a>             <span class="m">for</span> <span class="f">(</span><span class="b">i</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span> <span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span><span class="f">;</span> <span class="b">i</span><span class="f">++</span><span class="f">)</span> <span class="f">{</span>
<a name="3055" /><a href="dictobject.c.html#3055"><span class="True">    3055:</span></a>                 <a href="macros_ref.html#_UHlfVklTSVRfMA__"><span class="b">Py_VISIT</span></a><span class="f">(</span><span class="b">entries</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_value</span><span class="f">)</span><span class="f">;</span>
<a name="3056" /><a href="dictobject.c.html#3056"><span class="True">    3056:</span></a>             <span class="f">}</span>
<a name="3057" /><a href="dictobject.c.html#3057"><span class="True">    3057:</span></a>         <span class="f">}</span>
<a name="3058" /><a href="dictobject.c.html#3058"><span class="True">    3058:</span></a>     <span class="f">}</span>
<a name="3059" /><a href="dictobject.c.html#3059"><span class="True">    3059:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="3060" /><a href="dictobject.c.html#3060"><span class="True">    3060:</span></a> <span class="f">}</span>
<a name="3061" /><span class="True">    3061:</span> 
<a name="3062" /><a href="dictobject.c.html#3062"><span class="True">    3062:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="3063" /><a href="dictobject.c.html#3063"><span class="True">    3063:</span></a> <span class="b">dict_tp_clear</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">)</span>
<a name="3064" /><a href="dictobject.c.html#3064"><span class="True">    3064:</span></a> <span class="f">{</span>
<a name="3065" /><a href="dictobject.c.html#3065"><span class="True">    3065:</span></a>     <span class="b">PyDict_Clear</span><span class="f">(</span><span class="b">op</span><span class="f">)</span><span class="f">;</span>
<a name="3066" /><a href="dictobject.c.html#3066"><span class="True">    3066:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="3067" /><a href="dictobject.c.html#3067"><span class="True">    3067:</span></a> <span class="f">}</span>
<a name="3068" /><span class="True">    3068:</span> 
<a name="3069" /><a href="dictobject.c.html#3069"><span class="True">    3069:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">dictiter_new</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">,</span> <span class="b">PyTypeObject</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="3070" /><span class="True">    3070:</span> 
<a name="3071" /><a href="dictobject.c.html#3071"><span class="True">    3071:</span></a> <span class="b">Py_ssize_t</span>
<a name="3072" /><a href="dictobject.c.html#3072"><span class="True">    3072:</span></a> <span class="b">_PyDict_SizeOf</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="3073" /><a href="dictobject.c.html#3073"><span class="True">    3073:</span></a> <span class="f">{</span>
<a name="3074" /><a href="dictobject.c.html#3074"><span class="True">    3074:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">size</span><span class="f">,</span> <span class="b">usable</span><span class="f">,</span> <span class="b">res</span><span class="f">;</span>
<a name="3075" /><span class="True">    3075:</span> 
<a name="3076" /><a href="dictobject.c.html#3076"><span class="True">    3076:</span></a>     <span class="b">size</span> <span class="f">=</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="3077" /><a href="dictobject.c.html#3077"><span class="True">    3077:</span></a>     <span class="b">usable</span> <span class="f">=</span> <a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><span class="b">size</span><span class="f">)</span><span class="f">;</span>
<a name="3078" /><span class="True">    3078:</span> 
<a name="3079" /><a href="dictobject.c.html#3079"><span class="True">    3079:</span></a>     <span class="b">res</span> <span class="f">=</span> <a href="macros_ref.html#_X1B5T2JqZWN0X1NJWkVfMA__"><span class="b">_PyObject_SIZE</span></a><span class="f">(</span><a href="macros_ref.html#_UHlfVFlQRV8w"><span class="b">Py_TYPE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="3080" /><a href="dictobject.c.html#3080"><span class="True">    3080:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span>
<a name="3081" /><a href="dictobject.c.html#3081"><span class="True">    3081:</span></a>         <span class="b">res</span> <span class="f">+=</span> <span class="b">usable</span> <span class="f">*</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyObject</span><span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="3082" /><span class="True">    3082:</span>     <span class="k">/* If the dictionary is split, the keys portion is accounted-for</span>
<a name="3083" /><span class="True">    3083:</span> <span class="k">       in the type object. */</span>
<a name="3084" /><a href="dictobject.c.html#3084"><span class="True">    3084:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span>
<a name="3085" /><a href="dictobject.c.html#3085"><span class="True">    3085:</span></a>         <span class="b">res</span> <span class="f">+=</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeysObject</span><span class="f">)</span>
<a name="3086" /><a href="dictobject.c.html#3086"><span class="True">    3086:</span></a>                 <span class="f">-</span> <a href="macros_ref.html#_UHlfTUVNQkVSX1NJWkVfMA__"><span class="b">Py_MEMBER_SIZE</span></a><span class="f">(</span><span class="b">PyDictKeysObject</span><span class="f">,</span> <span class="b">dk_indices</span><span class="f">)</span>
<a name="3087" /><a href="dictobject.c.html#3087"><span class="True">    3087:</span></a>                 <span class="f">+</span> <a href="macros_ref.html#_REtfSVhTSVpFXzA_"><span class="b">DK_IXSIZE</span></a><span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span> <span class="f">*</span> <span class="b">size</span>
<a name="3088" /><a href="dictobject.c.html#3088"><span class="True">    3088:</span></a>                 <span class="f">+</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeyEntry</span><span class="f">)</span> <span class="f">*</span> <span class="b">usable</span><span class="f">)</span><span class="f">;</span>
<a name="3089" /><a href="dictobject.c.html#3089"><span class="True">    3089:</span></a>     <span class="m">return</span> <span class="b">res</span><span class="f">;</span>
<a name="3090" /><a href="dictobject.c.html#3090"><span class="True">    3090:</span></a> <span class="f">}</span>
<a name="3091" /><span class="True">    3091:</span> 
<a name="3092" /><a href="dictobject.c.html#3092"><span class="True">    3092:</span></a> <span class="b">Py_ssize_t</span>
<a name="3093" /><a href="dictobject.c.html#3093"><span class="True">    3093:</span></a> <span class="b">_PyDict_KeysSize</span><span class="f">(</span><span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span><span class="f">)</span>
<a name="3094" /><a href="dictobject.c.html#3094"><span class="True">    3094:</span></a> <span class="f">{</span>
<a name="3095" /><a href="dictobject.c.html#3095"><span class="True">    3095:</span></a>     <span class="m">return</span> <span class="f">(</span><span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeysObject</span><span class="f">)</span>
<a name="3096" /><a href="dictobject.c.html#3096"><span class="True">    3096:</span></a>             <span class="f">-</span> <a href="macros_ref.html#_UHlfTUVNQkVSX1NJWkVfMA__"><span class="b">Py_MEMBER_SIZE</span></a><span class="f">(</span><span class="b">PyDictKeysObject</span><span class="f">,</span> <span class="b">dk_indices</span><span class="f">)</span>
<a name="3097" /><a href="dictobject.c.html#3097"><span class="True">    3097:</span></a>             <span class="f">+</span> <a href="macros_ref.html#_REtfSVhTSVpFXzA_"><span class="b">DK_IXSIZE</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span> <span class="f">*</span> <a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span>
<a name="3098" /><a href="dictobject.c.html#3098"><span class="True">    3098:</span></a>             <span class="f">+</span> <a href="macros_ref.html#_VVNBQkxFX0ZSQUNUSU9OXzA_"><span class="b">USABLE_FRACTION</span></a><span class="f">(</span><a href="macros_ref.html#_REtfU0laRV8w"><span class="b">DK_SIZE</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">)</span> <span class="f">*</span> <span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictKeyEntry</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="3099" /><a href="dictobject.c.html#3099"><span class="True">    3099:</span></a> <span class="f">}</span>
<a name="3100" /><span class="True">    3100:</span> 
<a name="3101" /><a href="dictobject.c.html#3101"><span class="True">    3101:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3102" /><a href="dictobject.c.html#3102"><span class="True">    3102:</span></a> <span class="b">dict_sizeof</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span><span class="f">)</span>
<a name="3103" /><a href="dictobject.c.html#3103"><span class="True">    3103:</span></a> <span class="f">{</span>
<a name="3104" /><a href="dictobject.c.html#3104"><span class="True">    3104:</span></a>     <span class="m">return</span> <span class="b">PyLong_FromSsize_t</span><span class="f">(</span><span class="b">_PyDict_SizeOf</span><span class="f">(</span><span class="b">mp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="3105" /><a href="dictobject.c.html#3105"><span class="True">    3105:</span></a> <span class="f">}</span>
<a name="3106" /><span class="True">    3106:</span> 
<a name="3107" /><a href="dictobject.c.html#3107"><span class="True">    3107:</span></a> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">getitem__doc__</span><span class="f">,</span> <span class="e">&quot;x.__getitem__(y) &lt;==&gt; x[y]&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3108" /><span class="True">    3108:</span> 
<a name="3109" /><span class="True">    3109:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">sizeof__doc__</span><span class="f">,</span>
<a name="3110" /><a href="dictobject.c.html#3110"><span class="True">    3110:</span></a> <span class="e">&quot;D.__sizeof__() -&gt; size of D in memory, in bytes&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3111" /><span class="True">    3111:</span> 
<a name="3112" /><span class="True">    3112:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">get__doc__</span><span class="f">,</span>
<a name="3113" /><a href="dictobject.c.html#3113"><span class="True">    3113:</span></a> <span class="e">&quot;D.get(k[,d]) -&gt; D[k] if k in D, else d.  d defaults to None.&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3114" /><span class="True">    3114:</span> 
<a name="3115" /><span class="True">    3115:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">setdefault_doc__</span><span class="f">,</span>
<a name="3116" /><a href="dictobject.c.html#3116"><span class="True">    3116:</span></a> <span class="e">&quot;D.setdefault(k[,d]) -&gt; D.get(k,d), also set D[k]=d if k not in D&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3117" /><span class="True">    3117:</span> 
<a name="3118" /><span class="True">    3118:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">pop__doc__</span><span class="f">,</span>
<a name="3119" /><a href="dictobject.c.html#3119"><span class="True">    3119:</span></a> <span class="e">&quot;D.pop(k[,d]) -&gt; v, remove specified key and return the corresponding value.\n\
If key is not found, d is returned if given, otherwise KeyError is raised&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3121" /><span class="True">    3121:</span> 
<a name="3122" /><span class="True">    3122:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">popitem__doc__</span><span class="f">,</span>
<a name="3123" /><a href="dictobject.c.html#3123"><span class="True">    3123:</span></a> <span class="e">&quot;D.popitem() -&gt; (k, v), remove and return some (key, value) pair as a\n\
2-tuple; but raise KeyError if D is empty.&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3125" /><span class="True">    3125:</span> 
<a name="3126" /><span class="True">    3126:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">update__doc__</span><span class="f">,</span>
<a name="3127" /><a href="dictobject.c.html#3127"><span class="True">    3127:</span></a> <span class="e">&quot;D.update([E, ]**F) -&gt; None.  Update D from dict/iterable E and F.\n\
If E is present and has a .keys() method, then does:  for k in E: D[k] = E[k]\n\
If E is present and lacks a .keys() method, then does:  for k, v in E: D[k] = v\n\
In either case, this is followed by: for k in F:  D[k] = F[k]&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3131" /><span class="True">    3131:</span> 
<a name="3132" /><span class="True">    3132:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">clear__doc__</span><span class="f">,</span>
<a name="3133" /><a href="dictobject.c.html#3133"><span class="True">    3133:</span></a> <span class="e">&quot;D.clear() -&gt; None.  Remove all items from D.&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3134" /><span class="True">    3134:</span> 
<a name="3135" /><span class="True">    3135:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">copy__doc__</span><span class="f">,</span>
<a name="3136" /><a href="dictobject.c.html#3136"><span class="True">    3136:</span></a> <span class="e">&quot;D.copy() -&gt; a shallow copy of D&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3137" /><span class="True">    3137:</span> 
<a name="3138" /><span class="True">    3138:</span> <span class="k">/* Forward */</span>
<a name="3139" /><a href="dictobject.c.html#3139"><span class="True">    3139:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">dictkeys_new</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="3140" /><a href="dictobject.c.html#3140"><span class="True">    3140:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">dictitems_new</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="3141" /><a href="dictobject.c.html#3141"><span class="True">    3141:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">dictvalues_new</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="f">;</span>
<a name="3142" /><span class="True">    3142:</span> 
<a name="3143" /><span class="True">    3143:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">keys__doc__</span><span class="f">,</span>
<a name="3144" /><a href="dictobject.c.html#3144"><span class="True">    3144:</span></a>              <span class="e">&quot;D.keys() -&gt; a set-like object providing a view on D&apos;s keys&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3145" /><span class="True">    3145:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">items__doc__</span><span class="f">,</span>
<a name="3146" /><a href="dictobject.c.html#3146"><span class="True">    3146:</span></a>              <span class="e">&quot;D.items() -&gt; a set-like object providing a view on D&apos;s items&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3147" /><span class="True">    3147:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">values__doc__</span><span class="f">,</span>
<a name="3148" /><a href="dictobject.c.html#3148"><span class="True">    3148:</span></a>              <span class="e">&quot;D.values() -&gt; an object providing a view on D&apos;s values&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3149" /><span class="True">    3149:</span> 
<a name="3150" /><a href="dictobject.c.html#3150"><span class="True">    3150:</span></a> <span class="m">static</span> <span class="b">PyMethodDef</span> <span class="b">mapp_methods</span><span class="f">[</span><span class="f">]</span> <span class="f">=</span> <span class="f">{</span>
<a name="3151" /><a href="dictobject.c.html#3151"><span class="True">    3151:</span></a>     <a href="macros_ref.html#_RElDVF9fX0NPTlRBSU5TX19fTUVUSE9EREVGXzA_"><span class="b">DICT___CONTAINS___METHODDEF</span></a>
<a name="3152" /><a href="dictobject.c.html#3152"><span class="True">    3152:</span></a>     <span class="f">{</span><span class="e">&quot;__getitem__&quot;</span><span class="f">,</span> <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dict_subscript</span><span class="f">,</span>        <a href="macros_ref.html#_TUVUSF9PXzA_"><span class="b">METH_O</span></a> <span class="f">|</span> <a href="macros_ref.html#_TUVUSF9DT0VYSVNUXzA_"><span class="b">METH_COEXIST</span></a><span class="f">,</span>
<a name="3153" /><a href="dictobject.c.html#3153"><span class="True">    3153:</span></a>      <span class="b">getitem__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3154" /><a href="dictobject.c.html#3154"><span class="True">    3154:</span></a>     <span class="f">{</span><span class="e">&quot;__sizeof__&quot;</span><span class="f">,</span>      <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dict_sizeof</span><span class="f">,</span>       <a href="macros_ref.html#_TUVUSF9OT0FSR1NfMA__"><span class="b">METH_NOARGS</span></a><span class="f">,</span>
<a name="3155" /><a href="dictobject.c.html#3155"><span class="True">    3155:</span></a>      <span class="b">sizeof__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3156" /><a href="dictobject.c.html#3156"><span class="True">    3156:</span></a>     <span class="f">{</span><span class="e">&quot;get&quot;</span><span class="f">,</span>         <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dict_get</span><span class="f">,</span>          <a href="macros_ref.html#_TUVUSF9WQVJBUkdTXzA_"><span class="b">METH_VARARGS</span></a><span class="f">,</span>
<a name="3157" /><a href="dictobject.c.html#3157"><span class="True">    3157:</span></a>      <span class="b">get__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3158" /><a href="dictobject.c.html#3158"><span class="True">    3158:</span></a>     <span class="f">{</span><span class="e">&quot;setdefault&quot;</span><span class="f">,</span>  <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dict_setdefault</span><span class="f">,</span>   <a href="macros_ref.html#_TUVUSF9WQVJBUkdTXzA_"><span class="b">METH_VARARGS</span></a><span class="f">,</span>
<a name="3159" /><a href="dictobject.c.html#3159"><span class="True">    3159:</span></a>      <span class="b">setdefault_doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3160" /><a href="dictobject.c.html#3160"><span class="True">    3160:</span></a>     <span class="f">{</span><span class="e">&quot;pop&quot;</span><span class="f">,</span>         <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dict_pop</span><span class="f">,</span>          <a href="macros_ref.html#_TUVUSF9WQVJBUkdTXzA_"><span class="b">METH_VARARGS</span></a><span class="f">,</span>
<a name="3161" /><a href="dictobject.c.html#3161"><span class="True">    3161:</span></a>      <span class="b">pop__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3162" /><a href="dictobject.c.html#3162"><span class="True">    3162:</span></a>     <span class="f">{</span><span class="e">&quot;popitem&quot;</span><span class="f">,</span>         <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dict_popitem</span><span class="f">,</span>      <a href="macros_ref.html#_TUVUSF9OT0FSR1NfMA__"><span class="b">METH_NOARGS</span></a><span class="f">,</span>
<a name="3163" /><a href="dictobject.c.html#3163"><span class="True">    3163:</span></a>      <span class="b">popitem__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3164" /><a href="dictobject.c.html#3164"><span class="True">    3164:</span></a>     <span class="f">{</span><span class="e">&quot;keys&quot;</span><span class="f">,</span>            <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dictkeys_new</span><span class="f">,</span>      <a href="macros_ref.html#_TUVUSF9OT0FSR1NfMA__"><span class="b">METH_NOARGS</span></a><span class="f">,</span>
<a name="3165" /><a href="dictobject.c.html#3165"><span class="True">    3165:</span></a>     <span class="b">keys__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3166" /><a href="dictobject.c.html#3166"><span class="True">    3166:</span></a>     <span class="f">{</span><span class="e">&quot;items&quot;</span><span class="f">,</span>           <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dictitems_new</span><span class="f">,</span>     <a href="macros_ref.html#_TUVUSF9OT0FSR1NfMA__"><span class="b">METH_NOARGS</span></a><span class="f">,</span>
<a name="3167" /><a href="dictobject.c.html#3167"><span class="True">    3167:</span></a>     <span class="b">items__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3168" /><a href="dictobject.c.html#3168"><span class="True">    3168:</span></a>     <span class="f">{</span><span class="e">&quot;values&quot;</span><span class="f">,</span>          <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dictvalues_new</span><span class="f">,</span>    <a href="macros_ref.html#_TUVUSF9OT0FSR1NfMA__"><span class="b">METH_NOARGS</span></a><span class="f">,</span>
<a name="3169" /><a href="dictobject.c.html#3169"><span class="True">    3169:</span></a>     <span class="b">values__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3170" /><a href="dictobject.c.html#3170"><span class="True">    3170:</span></a>     <span class="f">{</span><span class="e">&quot;update&quot;</span><span class="f">,</span>          <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dict_update</span><span class="f">,</span>       <a href="macros_ref.html#_TUVUSF9WQVJBUkdTXzA_"><span class="b">METH_VARARGS</span></a> <span class="f">|</span> <a href="macros_ref.html#_TUVUSF9LRVlXT1JEU18w"><span class="b">METH_KEYWORDS</span></a><span class="f">,</span>
<a name="3171" /><a href="dictobject.c.html#3171"><span class="True">    3171:</span></a>      <span class="b">update__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3172" /><a href="dictobject.c.html#3172"><span class="True">    3172:</span></a>     <a href="macros_ref.html#_RElDVF9GUk9NS0VZU19NRVRIT0RERUZfMA__"><span class="b">DICT_FROMKEYS_METHODDEF</span></a>
<a name="3173" /><a href="dictobject.c.html#3173"><span class="True">    3173:</span></a>     <span class="f">{</span><span class="e">&quot;clear&quot;</span><span class="f">,</span>           <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dict_clear</span><span class="f">,</span>        <a href="macros_ref.html#_TUVUSF9OT0FSR1NfMA__"><span class="b">METH_NOARGS</span></a><span class="f">,</span>
<a name="3174" /><a href="dictobject.c.html#3174"><span class="True">    3174:</span></a>      <span class="b">clear__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3175" /><a href="dictobject.c.html#3175"><span class="True">    3175:</span></a>     <span class="f">{</span><span class="e">&quot;copy&quot;</span><span class="f">,</span>            <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dict_copy</span><span class="f">,</span>         <a href="macros_ref.html#_TUVUSF9OT0FSR1NfMA__"><span class="b">METH_NOARGS</span></a><span class="f">,</span>
<a name="3176" /><a href="dictobject.c.html#3176"><span class="True">    3176:</span></a>      <span class="b">copy__doc__</span><span class="f">}</span><span class="f">,</span>
<a name="3177" /><a href="dictobject.c.html#3177"><span class="True">    3177:</span></a>     <span class="f">{</span><a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span>              <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">}</span>   <span class="k">/* sentinel */</span>
<a name="3178" /><a href="dictobject.c.html#3178"><span class="True">    3178:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="3179" /><span class="True">    3179:</span> 
<a name="3180" /><span class="True">    3180:</span> <span class="k">/* Return 1 if `key` is in dict `op`, 0 if not, and -1 on error. */</span>
<a name="3181" /><a href="dictobject.c.html#3181"><span class="True">    3181:</span></a> <span class="m">int</span>
<a name="3182" /><a href="dictobject.c.html#3182"><span class="True">    3182:</span></a> <span class="b">PyDict_Contains</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="3183" /><a href="dictobject.c.html#3183"><span class="True">    3183:</span></a> <span class="f">{</span>
<a name="3184" /><a href="dictobject.c.html#3184"><span class="True">    3184:</span></a>     <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">;</span>
<a name="3185" /><a href="dictobject.c.html#3185"><span class="True">    3185:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="3186" /><a href="dictobject.c.html#3186"><span class="True">    3186:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="3187" /><a href="dictobject.c.html#3187"><span class="True">    3187:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="3188" /><span class="True">    3188:</span> 
<a name="3189" /><a href="dictobject.c.html#3189"><span class="True">    3189:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlVbmljb2RlX0NoZWNrRXhhY3RfMA__"><span class="b">PyUnicode_CheckExact</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span> <span class="f">||</span>
<a name="3190" /><a href="dictobject.c.html#3190"><span class="True">    3190:</span></a>         <span class="f">(</span><span class="b">hash</span> <span class="f">=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyASCIIObject</span> <span class="f">*</span><span class="f">)</span> <span class="b">key</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">hash</span><span class="f">)</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="3191" /><a href="dictobject.c.html#3191"><span class="True">    3191:</span></a>         <span class="b">hash</span> <span class="f">=</span> <span class="b">PyObject_Hash</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="3192" /><a href="dictobject.c.html#3192"><span class="True">    3192:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">hash</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="3193" /><a href="dictobject.c.html#3193"><span class="True">    3193:</span></a>             <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="3194" /><a href="dictobject.c.html#3194"><span class="True">    3194:</span></a>     <span class="f">}</span>
<a name="3195" /><a href="dictobject.c.html#3195"><span class="True">    3195:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="3196" /><a href="dictobject.c.html#3196"><span class="True">    3196:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="3197" /><a href="dictobject.c.html#3197"><span class="True">    3197:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="3198" /><a href="dictobject.c.html#3198"><span class="True">    3198:</span></a>     <span class="m">return</span> <span class="f">(</span><span class="b">ix</span> <span class="f">!=</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">&amp;&amp;</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="3199" /><a href="dictobject.c.html#3199"><span class="True">    3199:</span></a> <span class="f">}</span>
<a name="3200" /><span class="True">    3200:</span> 
<a name="3201" /><span class="True">    3201:</span> <span class="k">/* Internal version of PyDict_Contains used when the hash value is already known */</span>
<a name="3202" /><a href="dictobject.c.html#3202"><span class="True">    3202:</span></a> <span class="m">int</span>
<a name="3203" /><a href="dictobject.c.html#3203"><span class="True">    3203:</span></a> <span class="b">_PyDict_Contains</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">op</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">Py_hash_t</span> <span class="b">hash</span><span class="f">)</span>
<a name="3204" /><a href="dictobject.c.html#3204"><span class="True">    3204:</span></a> <span class="f">{</span>
<a name="3205" /><a href="dictobject.c.html#3205"><span class="True">    3205:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">mp</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">op</span><span class="f">;</span>
<a name="3206" /><a href="dictobject.c.html#3206"><span class="True">    3206:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_addr</span><span class="f">;</span>
<a name="3207" /><a href="dictobject.c.html#3207"><span class="True">    3207:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">ix</span><span class="f">;</span>
<a name="3208" /><span class="True">    3208:</span> 
<a name="3209" /><a href="dictobject.c.html#3209"><span class="True">    3209:</span></a>     <span class="b">ix</span> <span class="f">=</span> <span class="f">(</span><span class="b">mp</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span><span class="f">)</span><span class="f">(</span><span class="b">mp</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">hash</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">value_addr</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="3210" /><a href="dictobject.c.html#3210"><span class="True">    3210:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ix</span> <span class="f">==</span> <a href="macros_ref.html#_REtJWF9FUlJPUl8w"><span class="b">DKIX_ERROR</span></a><span class="f">)</span>
<a name="3211" /><a href="dictobject.c.html#3211"><span class="True">    3211:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="3212" /><a href="dictobject.c.html#3212"><span class="True">    3212:</span></a>     <span class="m">return</span> <span class="f">(</span><span class="b">ix</span> <span class="f">!=</span> <a href="macros_ref.html#_REtJWF9FTVBUWV8w"><span class="b">DKIX_EMPTY</span></a> <span class="f">&amp;&amp;</span> <span class="f">*</span><span class="b">value_addr</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="3213" /><a href="dictobject.c.html#3213"><span class="True">    3213:</span></a> <span class="f">}</span>
<a name="3214" /><span class="True">    3214:</span> 
<a name="3215" /><span class="True">    3215:</span> <span class="k">/* Hack to implement &quot;key in dict&quot; */</span>
<a name="3216" /><a href="dictobject.c.html#3216"><span class="True">    3216:</span></a> <span class="m">static</span> <span class="b">PySequenceMethods</span> <span class="b">dict_as_sequence</span> <span class="f">=</span> <span class="f">{</span>
<a name="3217" /><a href="dictobject.c.html#3217"><span class="True">    3217:</span></a>     <span class="c">0</span><span class="f">,</span>                          <span class="k">/* sq_length */</span>
<a name="3218" /><a href="dictobject.c.html#3218"><span class="True">    3218:</span></a>     <span class="c">0</span><span class="f">,</span>                          <span class="k">/* sq_concat */</span>
<a name="3219" /><a href="dictobject.c.html#3219"><span class="True">    3219:</span></a>     <span class="c">0</span><span class="f">,</span>                          <span class="k">/* sq_repeat */</span>
<a name="3220" /><a href="dictobject.c.html#3220"><span class="True">    3220:</span></a>     <span class="c">0</span><span class="f">,</span>                          <span class="k">/* sq_item */</span>
<a name="3221" /><a href="dictobject.c.html#3221"><span class="True">    3221:</span></a>     <span class="c">0</span><span class="f">,</span>                          <span class="k">/* sq_slice */</span>
<a name="3222" /><a href="dictobject.c.html#3222"><span class="True">    3222:</span></a>     <span class="c">0</span><span class="f">,</span>                          <span class="k">/* sq_ass_item */</span>
<a name="3223" /><a href="dictobject.c.html#3223"><span class="True">    3223:</span></a>     <span class="c">0</span><span class="f">,</span>                          <span class="k">/* sq_ass_slice */</span>
<a name="3224" /><a href="dictobject.c.html#3224"><span class="True">    3224:</span></a>     <span class="b">PyDict_Contains</span><span class="f">,</span>            <span class="k">/* sq_contains */</span>
<a name="3225" /><a href="dictobject.c.html#3225"><span class="True">    3225:</span></a>     <span class="c">0</span><span class="f">,</span>                          <span class="k">/* sq_inplace_concat */</span>
<a name="3226" /><a href="dictobject.c.html#3226"><span class="True">    3226:</span></a>     <span class="c">0</span><span class="f">,</span>                          <span class="k">/* sq_inplace_repeat */</span>
<a name="3227" /><a href="dictobject.c.html#3227"><span class="True">    3227:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="3228" /><span class="True">    3228:</span> 
<a name="3229" /><a href="dictobject.c.html#3229"><span class="True">    3229:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3230" /><a href="dictobject.c.html#3230"><span class="True">    3230:</span></a> <span class="b">dict_new</span><span class="f">(</span><span class="b">PyTypeObject</span> <span class="f">*</span><span class="b">type</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">args</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">kwds</span><span class="f">)</span>
<a name="3231" /><a href="dictobject.c.html#3231"><span class="True">    3231:</span></a> <span class="f">{</span>
<a name="3232" /><a href="dictobject.c.html#3232"><span class="True">    3232:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">self</span><span class="f">;</span>
<a name="3233" /><a href="dictobject.c.html#3233"><span class="True">    3233:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">d</span><span class="f">;</span>
<a name="3234" /><span class="True">    3234:</span> 
<a name="3235" /><a href="dictobject.c.html#3235"><span class="True">    3235:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">type</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <span class="b">type</span><span class="f">-&gt;</span><span class="b">tp_alloc</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="3236" /><a href="dictobject.c.html#3236"><span class="True">    3236:</span></a>     <span class="b">self</span> <span class="f">=</span> <span class="b">type</span><span class="f">-&gt;</span><span class="b">tp_alloc</span><span class="f">(</span><span class="b">type</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="3237" /><a href="dictobject.c.html#3237"><span class="True">    3237:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">self</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3238" /><a href="dictobject.c.html#3238"><span class="True">    3238:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3239" /><a href="dictobject.c.html#3239"><span class="True">    3239:</span></a>     <span class="b">d</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">self</span><span class="f">;</span>
<a name="3240" /><span class="True">    3240:</span> 
<a name="3241" /><span class="True">    3241:</span>     <span class="k">/* The object has been implicitly tracked by tp_alloc */</span>
<a name="3242" /><a href="dictobject.c.html#3242"><span class="True">    3242:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">type</span> <span class="f">==</span> <span class="f">&amp;</span><span class="b">PyDict_Type</span><span class="f">)</span>
<a name="3243" /><a href="dictobject.c.html#3243"><span class="True">    3243:</span></a>         <a href="macros_ref.html#_X1B5T2JqZWN0X0dDX1VOVFJBQ0tfMA__"><span class="b">_PyObject_GC_UNTRACK</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="3244" /><span class="True">    3244:</span> 
<a name="3245" /><a href="dictobject.c.html#3245"><span class="True">    3245:</span></a>     <span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_used</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="3246" /><a href="dictobject.c.html#3246"><span class="True">    3246:</span></a>     <span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_version_tag</span> <span class="f">=</span> <a href="macros_ref.html#_RElDVF9ORVhUX1ZFUlNJT05fMA__"><span class="b">DICT_NEXT_VERSION</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="3247" /><a href="dictobject.c.html#3247"><span class="True">    3247:</span></a>     <span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">=</span> <span class="b">new_keys_object</span><span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X01JTlNJWkVfMA__"><span class="b">PyDict_MINSIZE</span></a><span class="f">)</span><span class="f">;</span>
<a name="3248" /><a href="dictobject.c.html#3248"><span class="True">    3248:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_keys</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3249" /><a href="dictobject.c.html#3249"><span class="True">    3249:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="3250" /><a href="dictobject.c.html#3250"><span class="True">    3250:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3251" /><a href="dictobject.c.html#3251"><span class="True">    3251:</span></a>     <span class="f">}</span>
<a name="3252" /><a href="dictobject.c.html#3252"><span class="True">    3252:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">_PyDict_CheckConsistency</span><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="3253" /><a href="dictobject.c.html#3253"><span class="True">    3253:</span></a>     <span class="m">return</span> <span class="b">self</span><span class="f">;</span>
<a name="3254" /><a href="dictobject.c.html#3254"><span class="True">    3254:</span></a> <span class="f">}</span>
<a name="3255" /><span class="True">    3255:</span> 
<a name="3256" /><a href="dictobject.c.html#3256"><span class="True">    3256:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="3257" /><a href="dictobject.c.html#3257"><span class="True">    3257:</span></a> <span class="b">dict_init</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">args</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">kwds</span><span class="f">)</span>
<a name="3258" /><a href="dictobject.c.html#3258"><span class="True">    3258:</span></a> <span class="f">{</span>
<a name="3259" /><a href="dictobject.c.html#3259"><span class="True">    3259:</span></a>     <span class="m">return</span> <span class="b">dict_update_common</span><span class="f">(</span><span class="b">self</span><span class="f">,</span> <span class="b">args</span><span class="f">,</span> <span class="b">kwds</span><span class="f">,</span> <span class="e">&quot;dict&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3260" /><a href="dictobject.c.html#3260"><span class="True">    3260:</span></a> <span class="f">}</span>
<a name="3261" /><span class="True">    3261:</span> 
<a name="3262" /><a href="dictobject.c.html#3262"><span class="True">    3262:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3263" /><a href="dictobject.c.html#3263"><span class="True">    3263:</span></a> <span class="b">dict_iter</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">)</span>
<a name="3264" /><a href="dictobject.c.html#3264"><span class="True">    3264:</span></a> <span class="f">{</span>
<a name="3265" /><a href="dictobject.c.html#3265"><span class="True">    3265:</span></a>     <span class="m">return</span> <span class="b">dictiter_new</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyDictIterKey_Type</span><span class="f">)</span><span class="f">;</span>
<a name="3266" /><a href="dictobject.c.html#3266"><span class="True">    3266:</span></a> <span class="f">}</span>
<a name="3267" /><span class="True">    3267:</span> 
<a name="3268" /><span class="True">    3268:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">dictionary_doc</span><span class="f">,</span>
<a name="3269" /><span class="True">    3269:</span> <span class="e">&quot;dict() -&gt; new empty dictionary\n&quot;</span>
<a name="3270" /><span class="True">    3270:</span> <span class="e">&quot;dict(mapping) -&gt; new dictionary initialized from a mapping object&apos;s\n&quot;</span>
<a name="3271" /><span class="True">    3271:</span> <span class="e">&quot;    (key, value) pairs\n&quot;</span>
<a name="3272" /><span class="True">    3272:</span> <span class="e">&quot;dict(iterable) -&gt; new dictionary initialized as if via:\n&quot;</span>
<a name="3273" /><span class="True">    3273:</span> <span class="e">&quot;    d = {}\n&quot;</span>
<a name="3274" /><span class="True">    3274:</span> <span class="e">&quot;    for k, v in iterable:\n&quot;</span>
<a name="3275" /><span class="True">    3275:</span> <span class="e">&quot;        d[k] = v\n&quot;</span>
<a name="3276" /><span class="True">    3276:</span> <span class="e">&quot;dict(**kwargs) -&gt; new dictionary initialized with the name=value pairs\n&quot;</span>
<a name="3277" /><a href="dictobject.c.html#3277"><span class="True">    3277:</span></a> <span class="e">&quot;    in the keyword argument list.  For example:  dict(one=1, two=2)&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3278" /><span class="True">    3278:</span> 
<a name="3279" /><a href="dictobject.c.html#3279"><span class="True">    3279:</span></a> <span class="b">PyTypeObject</span> <span class="b">PyDict_Type</span> <span class="f">=</span> <span class="f">{</span>
<a name="3280" /><a href="dictobject.c.html#3280"><span class="True">    3280:</span></a>     <a href="macros_ref.html#_UHlWYXJPYmplY3RfSEVBRF9JTklUXzA_"><span class="b">PyVarObject_HEAD_INIT</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">PyType_Type</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="3281" /><a href="dictobject.c.html#3281"><span class="True">    3281:</span></a>     <span class="e">&quot;dict&quot;</span><span class="f">,</span>
<a name="3282" /><a href="dictobject.c.html#3282"><span class="True">    3282:</span></a>     <span class="m">sizeof</span><span class="f">(</span><span class="b">PyDictObject</span><span class="f">)</span><span class="f">,</span>
<a name="3283" /><a href="dictobject.c.html#3283"><span class="True">    3283:</span></a>     <span class="c">0</span><span class="f">,</span>
<a name="3284" /><a href="dictobject.c.html#3284"><span class="True">    3284:</span></a>     <span class="f">(</span><span class="b">destructor</span><span class="f">)</span><span class="b">dict_dealloc</span><span class="f">,</span>                   <span class="k">/* tp_dealloc */</span>
<a name="3285" /><a href="dictobject.c.html#3285"><span class="True">    3285:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_print */</span>
<a name="3286" /><a href="dictobject.c.html#3286"><span class="True">    3286:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_getattr */</span>
<a name="3287" /><a href="dictobject.c.html#3287"><span class="True">    3287:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattr */</span>
<a name="3288" /><a href="dictobject.c.html#3288"><span class="True">    3288:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_reserved */</span>
<a name="3289" /><a href="dictobject.c.html#3289"><span class="True">    3289:</span></a>     <span class="f">(</span><span class="b">reprfunc</span><span class="f">)</span><span class="b">dict_repr</span><span class="f">,</span>                        <span class="k">/* tp_repr */</span>
<a name="3290" /><a href="dictobject.c.html#3290"><span class="True">    3290:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_number */</span>
<a name="3291" /><a href="dictobject.c.html#3291"><span class="True">    3291:</span></a>     <span class="f">&amp;</span><span class="b">dict_as_sequence</span><span class="f">,</span>                          <span class="k">/* tp_as_sequence */</span>
<a name="3292" /><a href="dictobject.c.html#3292"><span class="True">    3292:</span></a>     <span class="f">&amp;</span><span class="b">dict_as_mapping</span><span class="f">,</span>                           <span class="k">/* tp_as_mapping */</span>
<a name="3293" /><a href="dictobject.c.html#3293"><span class="True">    3293:</span></a>     <span class="b">PyObject_HashNotImplemented</span><span class="f">,</span>                <span class="k">/* tp_hash */</span>
<a name="3294" /><a href="dictobject.c.html#3294"><span class="True">    3294:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_call */</span>
<a name="3295" /><a href="dictobject.c.html#3295"><span class="True">    3295:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_str */</span>
<a name="3296" /><a href="dictobject.c.html#3296"><span class="True">    3296:</span></a>     <span class="b">PyObject_GenericGetAttr</span><span class="f">,</span>                    <span class="k">/* tp_getattro */</span>
<a name="3297" /><a href="dictobject.c.html#3297"><span class="True">    3297:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattro */</span>
<a name="3298" /><a href="dictobject.c.html#3298"><span class="True">    3298:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_buffer */</span>
<a name="3299" /><a href="dictobject.c.html#3299"><span class="True">    3299:</span></a>     <a href="macros_ref.html#_UHlfVFBGTEFHU19ERUZBVUxUXzA_"><span class="b">Py_TPFLAGS_DEFAULT</span></a> <span class="f">|</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19IQVZFX0dDXzA_"><span class="b">Py_TPFLAGS_HAVE_GC</span></a> <span class="f">|</span>
<a name="3300" /><a href="dictobject.c.html#3300"><span class="True">    3300:</span></a>         <a href="macros_ref.html#_UHlfVFBGTEFHU19CQVNFVFlQRV8w"><span class="b">Py_TPFLAGS_BASETYPE</span></a> <span class="f">|</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19ESUNUX1NVQkNMQVNTXzA_"><span class="b">Py_TPFLAGS_DICT_SUBCLASS</span></a><span class="f">,</span>         <span class="k">/* tp_flags */</span>
<a name="3301" /><a href="dictobject.c.html#3301"><span class="True">    3301:</span></a>     <span class="b">dictionary_doc</span><span class="f">,</span>                             <span class="k">/* tp_doc */</span>
<a name="3302" /><a href="dictobject.c.html#3302"><span class="True">    3302:</span></a>     <span class="b">dict_traverse</span><span class="f">,</span>                              <span class="k">/* tp_traverse */</span>
<a name="3303" /><a href="dictobject.c.html#3303"><span class="True">    3303:</span></a>     <span class="b">dict_tp_clear</span><span class="f">,</span>                              <span class="k">/* tp_clear */</span>
<a name="3304" /><a href="dictobject.c.html#3304"><span class="True">    3304:</span></a>     <span class="b">dict_richcompare</span><span class="f">,</span>                           <span class="k">/* tp_richcompare */</span>
<a name="3305" /><a href="dictobject.c.html#3305"><span class="True">    3305:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_weaklistoffset */</span>
<a name="3306" /><a href="dictobject.c.html#3306"><span class="True">    3306:</span></a>     <span class="f">(</span><span class="b">getiterfunc</span><span class="f">)</span><span class="b">dict_iter</span><span class="f">,</span>                     <span class="k">/* tp_iter */</span>
<a name="3307" /><a href="dictobject.c.html#3307"><span class="True">    3307:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_iternext */</span>
<a name="3308" /><a href="dictobject.c.html#3308"><span class="True">    3308:</span></a>     <span class="b">mapp_methods</span><span class="f">,</span>                               <span class="k">/* tp_methods */</span>
<a name="3309" /><a href="dictobject.c.html#3309"><span class="True">    3309:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_members */</span>
<a name="3310" /><a href="dictobject.c.html#3310"><span class="True">    3310:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_getset */</span>
<a name="3311" /><a href="dictobject.c.html#3311"><span class="True">    3311:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_base */</span>
<a name="3312" /><a href="dictobject.c.html#3312"><span class="True">    3312:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_dict */</span>
<a name="3313" /><a href="dictobject.c.html#3313"><span class="True">    3313:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_descr_get */</span>
<a name="3314" /><a href="dictobject.c.html#3314"><span class="True">    3314:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_descr_set */</span>
<a name="3315" /><a href="dictobject.c.html#3315"><span class="True">    3315:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_dictoffset */</span>
<a name="3316" /><a href="dictobject.c.html#3316"><span class="True">    3316:</span></a>     <span class="b">dict_init</span><span class="f">,</span>                                  <span class="k">/* tp_init */</span>
<a name="3317" /><a href="dictobject.c.html#3317"><span class="True">    3317:</span></a>     <span class="b">PyType_GenericAlloc</span><span class="f">,</span>                        <span class="k">/* tp_alloc */</span>
<a name="3318" /><a href="dictobject.c.html#3318"><span class="True">    3318:</span></a>     <span class="b">dict_new</span><span class="f">,</span>                                   <span class="k">/* tp_new */</span>
<a name="3319" /><a href="dictobject.c.html#3319"><span class="True">    3319:</span></a>     <span class="b">PyObject_GC_Del</span><span class="f">,</span>                            <span class="k">/* tp_free */</span>
<a name="3320" /><a href="dictobject.c.html#3320"><span class="True">    3320:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="3321" /><span class="True">    3321:</span> 
<a name="3322" /><a href="dictobject.c.html#3322"><span class="True">    3322:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3323" /><a href="dictobject.c.html#3323"><span class="True">    3323:</span></a> <span class="b">_PyDict_GetItemId</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">dp</span><span class="f">,</span> <span class="m">struct</span> <span class="b">_Py_Identifier</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="3324" /><a href="dictobject.c.html#3324"><span class="True">    3324:</span></a> <span class="f">{</span>
<a name="3325" /><a href="dictobject.c.html#3325"><span class="True">    3325:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">kv</span><span class="f">;</span>
<a name="3326" /><a href="dictobject.c.html#3326"><span class="True">    3326:</span></a>     <span class="b">kv</span> <span class="f">=</span> <span class="b">_PyUnicode_FromId</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span> <span class="k">/* borrowed */</span>
<a name="3327" /><a href="dictobject.c.html#3327"><span class="True">    3327:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">kv</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3328" /><a href="dictobject.c.html#3328"><span class="True">    3328:</span></a>         <span class="b">PyErr_Clear</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="3329" /><a href="dictobject.c.html#3329"><span class="True">    3329:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3330" /><a href="dictobject.c.html#3330"><span class="True">    3330:</span></a>     <span class="f">}</span>
<a name="3331" /><a href="dictobject.c.html#3331"><span class="True">    3331:</span></a>     <span class="m">return</span> <span class="b">PyDict_GetItem</span><span class="f">(</span><span class="b">dp</span><span class="f">,</span> <span class="b">kv</span><span class="f">)</span><span class="f">;</span>
<a name="3332" /><a href="dictobject.c.html#3332"><span class="True">    3332:</span></a> <span class="f">}</span>
<a name="3333" /><span class="True">    3333:</span> 
<a name="3334" /><span class="True">    3334:</span> <span class="k">/* For backward compatibility with old dictionary interface */</span>
<a name="3335" /><span class="True">    3335:</span> 
<a name="3336" /><a href="dictobject.c.html#3336"><span class="True">    3336:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3337" /><a href="dictobject.c.html#3337"><span class="True">    3337:</span></a> <span class="b">PyDict_GetItemString</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="3338" /><a href="dictobject.c.html#3338"><span class="True">    3338:</span></a> <span class="f">{</span>
<a name="3339" /><a href="dictobject.c.html#3339"><span class="True">    3339:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">kv</span><span class="f">,</span> <span class="f">*</span><span class="b">rv</span><span class="f">;</span>
<a name="3340" /><a href="dictobject.c.html#3340"><span class="True">    3340:</span></a>     <span class="b">kv</span> <span class="f">=</span> <span class="b">PyUnicode_FromString</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="3341" /><a href="dictobject.c.html#3341"><span class="True">    3341:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">kv</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3342" /><a href="dictobject.c.html#3342"><span class="True">    3342:</span></a>         <span class="b">PyErr_Clear</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="3343" /><a href="dictobject.c.html#3343"><span class="True">    3343:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3344" /><a href="dictobject.c.html#3344"><span class="True">    3344:</span></a>     <span class="f">}</span>
<a name="3345" /><a href="dictobject.c.html#3345"><span class="True">    3345:</span></a>     <span class="b">rv</span> <span class="f">=</span> <span class="b">PyDict_GetItem</span><span class="f">(</span><span class="b">v</span><span class="f">,</span> <span class="b">kv</span><span class="f">)</span><span class="f">;</span>
<a name="3346" /><a href="dictobject.c.html#3346"><span class="True">    3346:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">kv</span><span class="f">)</span><span class="f">;</span>
<a name="3347" /><a href="dictobject.c.html#3347"><span class="True">    3347:</span></a>     <span class="m">return</span> <span class="b">rv</span><span class="f">;</span>
<a name="3348" /><a href="dictobject.c.html#3348"><span class="True">    3348:</span></a> <span class="f">}</span>
<a name="3349" /><span class="True">    3349:</span> 
<a name="3350" /><a href="dictobject.c.html#3350"><span class="True">    3350:</span></a> <span class="m">int</span>
<a name="3351" /><a href="dictobject.c.html#3351"><span class="True">    3351:</span></a> <span class="b">_PyDict_SetItemId</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">,</span> <span class="m">struct</span> <span class="b">_Py_Identifier</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">item</span><span class="f">)</span>
<a name="3352" /><a href="dictobject.c.html#3352"><span class="True">    3352:</span></a> <span class="f">{</span>
<a name="3353" /><a href="dictobject.c.html#3353"><span class="True">    3353:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">kv</span><span class="f">;</span>
<a name="3354" /><a href="dictobject.c.html#3354"><span class="True">    3354:</span></a>     <span class="b">kv</span> <span class="f">=</span> <span class="b">_PyUnicode_FromId</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span> <span class="k">/* borrowed */</span>
<a name="3355" /><a href="dictobject.c.html#3355"><span class="True">    3355:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">kv</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3356" /><a href="dictobject.c.html#3356"><span class="True">    3356:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="3357" /><a href="dictobject.c.html#3357"><span class="True">    3357:</span></a>     <span class="m">return</span> <span class="b">PyDict_SetItem</span><span class="f">(</span><span class="b">v</span><span class="f">,</span> <span class="b">kv</span><span class="f">,</span> <span class="b">item</span><span class="f">)</span><span class="f">;</span>
<a name="3358" /><a href="dictobject.c.html#3358"><span class="True">    3358:</span></a> <span class="f">}</span>
<a name="3359" /><span class="True">    3359:</span> 
<a name="3360" /><a href="dictobject.c.html#3360"><span class="True">    3360:</span></a> <span class="m">int</span>
<a name="3361" /><a href="dictobject.c.html#3361"><span class="True">    3361:</span></a> <span class="b">PyDict_SetItemString</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">item</span><span class="f">)</span>
<a name="3362" /><a href="dictobject.c.html#3362"><span class="True">    3362:</span></a> <span class="f">{</span>
<a name="3363" /><a href="dictobject.c.html#3363"><span class="True">    3363:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">kv</span><span class="f">;</span>
<a name="3364" /><a href="dictobject.c.html#3364"><span class="True">    3364:</span></a>     <span class="m">int</span> <span class="b">err</span><span class="f">;</span>
<a name="3365" /><a href="dictobject.c.html#3365"><span class="True">    3365:</span></a>     <span class="b">kv</span> <span class="f">=</span> <span class="b">PyUnicode_FromString</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="3366" /><a href="dictobject.c.html#3366"><span class="True">    3366:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">kv</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3367" /><a href="dictobject.c.html#3367"><span class="True">    3367:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="3368" /><a href="dictobject.c.html#3368"><span class="True">    3368:</span></a>     <span class="b">PyUnicode_InternInPlace</span><span class="f">(</span><span class="f">&amp;</span><span class="b">kv</span><span class="f">)</span><span class="f">;</span> <span class="k">/* XXX Should we really? */</span>
<a name="3369" /><a href="dictobject.c.html#3369"><span class="True">    3369:</span></a>     <span class="b">err</span> <span class="f">=</span> <span class="b">PyDict_SetItem</span><span class="f">(</span><span class="b">v</span><span class="f">,</span> <span class="b">kv</span><span class="f">,</span> <span class="b">item</span><span class="f">)</span><span class="f">;</span>
<a name="3370" /><a href="dictobject.c.html#3370"><span class="True">    3370:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">kv</span><span class="f">)</span><span class="f">;</span>
<a name="3371" /><a href="dictobject.c.html#3371"><span class="True">    3371:</span></a>     <span class="m">return</span> <span class="b">err</span><span class="f">;</span>
<a name="3372" /><a href="dictobject.c.html#3372"><span class="True">    3372:</span></a> <span class="f">}</span>
<a name="3373" /><span class="True">    3373:</span> 
<a name="3374" /><a href="dictobject.c.html#3374"><span class="True">    3374:</span></a> <span class="m">int</span>
<a name="3375" /><a href="dictobject.c.html#3375"><span class="True">    3375:</span></a> <span class="b">_PyDict_DelItemId</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">,</span> <span class="b">_Py_Identifier</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="3376" /><a href="dictobject.c.html#3376"><span class="True">    3376:</span></a> <span class="f">{</span>
<a name="3377" /><a href="dictobject.c.html#3377"><span class="True">    3377:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">kv</span> <span class="f">=</span> <span class="b">_PyUnicode_FromId</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span> <span class="k">/* borrowed */</span>
<a name="3378" /><a href="dictobject.c.html#3378"><span class="True">    3378:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">kv</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3379" /><a href="dictobject.c.html#3379"><span class="True">    3379:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="3380" /><a href="dictobject.c.html#3380"><span class="True">    3380:</span></a>     <span class="m">return</span> <span class="b">PyDict_DelItem</span><span class="f">(</span><span class="b">v</span><span class="f">,</span> <span class="b">kv</span><span class="f">)</span><span class="f">;</span>
<a name="3381" /><a href="dictobject.c.html#3381"><span class="True">    3381:</span></a> <span class="f">}</span>
<a name="3382" /><span class="True">    3382:</span> 
<a name="3383" /><a href="dictobject.c.html#3383"><span class="True">    3383:</span></a> <span class="m">int</span>
<a name="3384" /><a href="dictobject.c.html#3384"><span class="True">    3384:</span></a> <span class="b">PyDict_DelItemString</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">v</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">key</span><span class="f">)</span>
<a name="3385" /><a href="dictobject.c.html#3385"><span class="True">    3385:</span></a> <span class="f">{</span>
<a name="3386" /><a href="dictobject.c.html#3386"><span class="True">    3386:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">kv</span><span class="f">;</span>
<a name="3387" /><a href="dictobject.c.html#3387"><span class="True">    3387:</span></a>     <span class="m">int</span> <span class="b">err</span><span class="f">;</span>
<a name="3388" /><a href="dictobject.c.html#3388"><span class="True">    3388:</span></a>     <span class="b">kv</span> <span class="f">=</span> <span class="b">PyUnicode_FromString</span><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="3389" /><a href="dictobject.c.html#3389"><span class="True">    3389:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">kv</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3390" /><a href="dictobject.c.html#3390"><span class="True">    3390:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="3391" /><a href="dictobject.c.html#3391"><span class="True">    3391:</span></a>     <span class="b">err</span> <span class="f">=</span> <span class="b">PyDict_DelItem</span><span class="f">(</span><span class="b">v</span><span class="f">,</span> <span class="b">kv</span><span class="f">)</span><span class="f">;</span>
<a name="3392" /><a href="dictobject.c.html#3392"><span class="True">    3392:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">kv</span><span class="f">)</span><span class="f">;</span>
<a name="3393" /><a href="dictobject.c.html#3393"><span class="True">    3393:</span></a>     <span class="m">return</span> <span class="b">err</span><span class="f">;</span>
<a name="3394" /><a href="dictobject.c.html#3394"><span class="True">    3394:</span></a> <span class="f">}</span>
<a name="3395" /><span class="True">    3395:</span> 
<a name="3396" /><span class="True">    3396:</span> <span class="k">/* Dictionary iterator types */</span>
<a name="3397" /><span class="True">    3397:</span> 
<a name="3398" /><a href="dictobject.c.html#3398"><span class="True">    3398:</span></a> <span class="m">typedef</span> <span class="m">struct</span> <span class="f">{</span>
<a name="3399" /><a href="dictobject.c.html#3399"><span class="True">    3399:</span></a>     <a href="macros_ref.html#_UHlPYmplY3RfSEVBRF8w"><span class="b">PyObject_HEAD</span></a>
<a name="3400" /><a href="dictobject.c.html#3400"><span class="True">    3400:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">di_dict</span><span class="f">;</span> <span class="k">/* Set to NULL when iterator is exhausted */</span>
<a name="3401" /><a href="dictobject.c.html#3401"><span class="True">    3401:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">di_used</span><span class="f">;</span>
<a name="3402" /><a href="dictobject.c.html#3402"><span class="True">    3402:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">di_pos</span><span class="f">;</span>
<a name="3403" /><a href="dictobject.c.html#3403"><span class="True">    3403:</span></a>     <span class="b">PyObject</span><span class="f">*</span> <span class="b">di_result</span><span class="f">;</span> <span class="k">/* reusable result tuple for iteritems */</span>
<a name="3404" /><a href="dictobject.c.html#3404"><span class="True">    3404:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">len</span><span class="f">;</span>
<a name="3405" /><a href="dictobject.c.html#3405"><span class="True">    3405:</span></a> <span class="f">}</span> <span class="b">dictiterobject</span><span class="f">;</span>
<a name="3406" /><span class="True">    3406:</span> 
<a name="3407" /><a href="dictobject.c.html#3407"><span class="True">    3407:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3408" /><a href="dictobject.c.html#3408"><span class="True">    3408:</span></a> <span class="b">dictiter_new</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">,</span> <span class="b">PyTypeObject</span> <span class="f">*</span><span class="b">itertype</span><span class="f">)</span>
<a name="3409" /><a href="dictobject.c.html#3409"><span class="True">    3409:</span></a> <span class="f">{</span>
<a name="3410" /><a href="dictobject.c.html#3410"><span class="True">    3410:</span></a>     <span class="b">dictiterobject</span> <span class="f">*</span><span class="b">di</span><span class="f">;</span>
<a name="3411" /><a href="dictobject.c.html#3411"><span class="True">    3411:</span></a>     <span class="b">di</span> <span class="f">=</span> <a href="macros_ref.html#_UHlPYmplY3RfR0NfTmV3XzA_"><span class="b">PyObject_GC_New</span></a><span class="f">(</span><span class="b">dictiterobject</span><span class="f">,</span> <span class="b">itertype</span><span class="f">)</span><span class="f">;</span>
<a name="3412" /><a href="dictobject.c.html#3412"><span class="True">    3412:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">di</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3413" /><a href="dictobject.c.html#3413"><span class="True">    3413:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3414" /><a href="dictobject.c.html#3414"><span class="True">    3414:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">dict</span><span class="f">)</span><span class="f">;</span>
<a name="3415" /><a href="dictobject.c.html#3415"><span class="True">    3415:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span> <span class="f">=</span> <span class="b">dict</span><span class="f">;</span>
<a name="3416" /><a href="dictobject.c.html#3416"><span class="True">    3416:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_used</span> <span class="f">=</span> <span class="b">dict</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="3417" /><a href="dictobject.c.html#3417"><span class="True">    3417:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_pos</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="3418" /><a href="dictobject.c.html#3418"><span class="True">    3418:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">len</span> <span class="f">=</span> <span class="b">dict</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="3419" /><a href="dictobject.c.html#3419"><span class="True">    3419:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">itertype</span> <span class="f">==</span> <span class="f">&amp;</span><span class="b">PyDictIterItem_Type</span><span class="f">)</span> <span class="f">{</span>
<a name="3420" /><a href="dictobject.c.html#3420"><span class="True">    3420:</span></a>         <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_result</span> <span class="f">=</span> <span class="b">PyTuple_Pack</span><span class="f">(</span><span class="c">2</span><span class="f">,</span> <a href="macros_ref.html#_UHlfTm9uZV8w"><span class="b">Py_None</span></a><span class="f">,</span> <a href="macros_ref.html#_UHlfTm9uZV8w"><span class="b">Py_None</span></a><span class="f">)</span><span class="f">;</span>
<a name="3421" /><a href="dictobject.c.html#3421"><span class="True">    3421:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">di</span><span class="f">-&gt;</span><span class="b">di_result</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3422" /><a href="dictobject.c.html#3422"><span class="True">    3422:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">di</span><span class="f">)</span><span class="f">;</span>
<a name="3423" /><a href="dictobject.c.html#3423"><span class="True">    3423:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3424" /><a href="dictobject.c.html#3424"><span class="True">    3424:</span></a>         <span class="f">}</span>
<a name="3425" /><a href="dictobject.c.html#3425"><span class="True">    3425:</span></a>     <span class="f">}</span>
<a name="3426" /><a href="dictobject.c.html#3426"><span class="True">    3426:</span></a>     <span class="m">else</span>
<a name="3427" /><a href="dictobject.c.html#3427"><span class="True">    3427:</span></a>         <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_result</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3428" /><a href="dictobject.c.html#3428"><span class="True">    3428:</span></a>     <a href="macros_ref.html#_X1B5T2JqZWN0X0dDX1RSQUNLXzA_"><span class="b">_PyObject_GC_TRACK</span></a><span class="f">(</span><span class="b">di</span><span class="f">)</span><span class="f">;</span>
<a name="3429" /><a href="dictobject.c.html#3429"><span class="True">    3429:</span></a>     <span class="m">return</span> <span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">di</span><span class="f">;</span>
<a name="3430" /><a href="dictobject.c.html#3430"><span class="True">    3430:</span></a> <span class="f">}</span>
<a name="3431" /><span class="True">    3431:</span> 
<a name="3432" /><a href="dictobject.c.html#3432"><span class="True">    3432:</span></a> <span class="m">static</span> <span class="m">void</span>
<a name="3433" /><a href="dictobject.c.html#3433"><span class="True">    3433:</span></a> <span class="b">dictiter_dealloc</span><span class="f">(</span><span class="b">dictiterobject</span> <span class="f">*</span><span class="b">di</span><span class="f">)</span>
<a name="3434" /><a href="dictobject.c.html#3434"><span class="True">    3434:</span></a> <span class="f">{</span>
<a name="3435" /><a href="dictobject.c.html#3435"><span class="True">    3435:</span></a>     <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span><span class="f">)</span><span class="f">;</span>
<a name="3436" /><a href="dictobject.c.html#3436"><span class="True">    3436:</span></a>     <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">di</span><span class="f">-&gt;</span><span class="b">di_result</span><span class="f">)</span><span class="f">;</span>
<a name="3437" /><a href="dictobject.c.html#3437"><span class="True">    3437:</span></a>     <span class="b">PyObject_GC_Del</span><span class="f">(</span><span class="b">di</span><span class="f">)</span><span class="f">;</span>
<a name="3438" /><a href="dictobject.c.html#3438"><span class="True">    3438:</span></a> <span class="f">}</span>
<a name="3439" /><span class="True">    3439:</span> 
<a name="3440" /><a href="dictobject.c.html#3440"><span class="True">    3440:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="3441" /><a href="dictobject.c.html#3441"><span class="True">    3441:</span></a> <span class="b">dictiter_traverse</span><span class="f">(</span><span class="b">dictiterobject</span> <span class="f">*</span><span class="b">di</span><span class="f">,</span> <span class="b">visitproc</span> <span class="b">visit</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">arg</span><span class="f">)</span>
<a name="3442" /><a href="dictobject.c.html#3442"><span class="True">    3442:</span></a> <span class="f">{</span>
<a name="3443" /><a href="dictobject.c.html#3443"><span class="True">    3443:</span></a>     <a href="macros_ref.html#_UHlfVklTSVRfMA__"><span class="b">Py_VISIT</span></a><span class="f">(</span><span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span><span class="f">)</span><span class="f">;</span>
<a name="3444" /><a href="dictobject.c.html#3444"><span class="True">    3444:</span></a>     <a href="macros_ref.html#_UHlfVklTSVRfMA__"><span class="b">Py_VISIT</span></a><span class="f">(</span><span class="b">di</span><span class="f">-&gt;</span><span class="b">di_result</span><span class="f">)</span><span class="f">;</span>
<a name="3445" /><a href="dictobject.c.html#3445"><span class="True">    3445:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="3446" /><a href="dictobject.c.html#3446"><span class="True">    3446:</span></a> <span class="f">}</span>
<a name="3447" /><span class="True">    3447:</span> 
<a name="3448" /><a href="dictobject.c.html#3448"><span class="True">    3448:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3449" /><a href="dictobject.c.html#3449"><span class="True">    3449:</span></a> <span class="b">dictiter_len</span><span class="f">(</span><span class="b">dictiterobject</span> <span class="f">*</span><span class="b">di</span><span class="f">)</span>
<a name="3450" /><a href="dictobject.c.html#3450"><span class="True">    3450:</span></a> <span class="f">{</span>
<a name="3451" /><a href="dictobject.c.html#3451"><span class="True">    3451:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">len</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="3452" /><a href="dictobject.c.html#3452"><span class="True">    3452:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_used</span> <span class="f">==</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span>
<a name="3453" /><a href="dictobject.c.html#3453"><span class="True">    3453:</span></a>         <span class="b">len</span> <span class="f">=</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">len</span><span class="f">;</span>
<a name="3454" /><a href="dictobject.c.html#3454"><span class="True">    3454:</span></a>     <span class="m">return</span> <span class="b">PyLong_FromSize_t</span><span class="f">(</span><span class="b">len</span><span class="f">)</span><span class="f">;</span>
<a name="3455" /><a href="dictobject.c.html#3455"><span class="True">    3455:</span></a> <span class="f">}</span>
<a name="3456" /><span class="True">    3456:</span> 
<a name="3457" /><span class="True">    3457:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">length_hint_doc</span><span class="f">,</span>
<a name="3458" /><a href="dictobject.c.html#3458"><span class="True">    3458:</span></a>              <span class="e">&quot;Private method returning an estimate of len(list(it)).&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3459" /><span class="True">    3459:</span> 
<a name="3460" /><a href="dictobject.c.html#3460"><span class="True">    3460:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3461" /><a href="dictobject.c.html#3461"><span class="True">    3461:</span></a> <span class="b">dictiter_reduce</span><span class="f">(</span><span class="b">dictiterobject</span> <span class="f">*</span><span class="b">di</span><span class="f">)</span><span class="f">;</span>
<a name="3462" /><span class="True">    3462:</span> 
<a name="3463" /><a href="dictobject.c.html#3463"><span class="True">    3463:</span></a> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">reduce_doc</span><span class="f">,</span> <span class="e">&quot;Return state information for pickling.&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3464" /><span class="True">    3464:</span> 
<a name="3465" /><a href="dictobject.c.html#3465"><span class="True">    3465:</span></a> <span class="m">static</span> <span class="b">PyMethodDef</span> <span class="b">dictiter_methods</span><span class="f">[</span><span class="f">]</span> <span class="f">=</span> <span class="f">{</span>
<a name="3466" /><a href="dictobject.c.html#3466"><span class="True">    3466:</span></a>     <span class="f">{</span><span class="e">&quot;__length_hint__&quot;</span><span class="f">,</span> <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dictiter_len</span><span class="f">,</span> <a href="macros_ref.html#_TUVUSF9OT0FSR1NfMA__"><span class="b">METH_NOARGS</span></a><span class="f">,</span>
<a name="3467" /><a href="dictobject.c.html#3467"><span class="True">    3467:</span></a>      <span class="b">length_hint_doc</span><span class="f">}</span><span class="f">,</span>
<a name="3468" /><a href="dictobject.c.html#3468"><span class="True">    3468:</span></a>      <span class="f">{</span><span class="e">&quot;__reduce__&quot;</span><span class="f">,</span> <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dictiter_reduce</span><span class="f">,</span> <a href="macros_ref.html#_TUVUSF9OT0FSR1NfMA__"><span class="b">METH_NOARGS</span></a><span class="f">,</span>
<a name="3469" /><a href="dictobject.c.html#3469"><span class="True">    3469:</span></a>      <span class="b">reduce_doc</span><span class="f">}</span><span class="f">,</span>
<a name="3470" /><a href="dictobject.c.html#3470"><span class="True">    3470:</span></a>     <span class="f">{</span><a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span>              <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">}</span>           <span class="k">/* sentinel */</span>
<a name="3471" /><a href="dictobject.c.html#3471"><span class="True">    3471:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="3472" /><span class="True">    3472:</span> 
<a name="3473" /><a href="dictobject.c.html#3473"><span class="True">    3473:</span></a> <span class="m">static</span> <span class="b">PyObject</span><span class="f">*</span>
<a name="3474" /><a href="dictobject.c.html#3474"><span class="True">    3474:</span></a> <span class="b">dictiter_iternextkey</span><span class="f">(</span><span class="b">dictiterobject</span> <span class="f">*</span><span class="b">di</span><span class="f">)</span>
<a name="3475" /><a href="dictobject.c.html#3475"><span class="True">    3475:</span></a> <span class="f">{</span>
<a name="3476" /><a href="dictobject.c.html#3476"><span class="True">    3476:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">;</span>
<a name="3477" /><a href="dictobject.c.html#3477"><span class="True">    3477:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="3478" /><a href="dictobject.c.html#3478"><span class="True">    3478:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">k</span><span class="f">;</span>
<a name="3479" /><a href="dictobject.c.html#3479"><span class="True">    3479:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">d</span> <span class="f">=</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span><span class="f">;</span>
<a name="3480" /><span class="True">    3480:</span> 
<a name="3481" /><a href="dictobject.c.html#3481"><span class="True">    3481:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">d</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3482" /><a href="dictobject.c.html#3482"><span class="True">    3482:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3483" /><a href="dictobject.c.html#3483"><span class="True">    3483:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a> <span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="3484" /><span class="True">    3484:</span> 
<a name="3485" /><a href="dictobject.c.html#3485"><span class="True">    3485:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">di</span><span class="f">-&gt;</span><span class="b">di_used</span> <span class="f">!=</span> <span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span> <span class="f">{</span>
<a name="3486" /><a href="dictobject.c.html#3486"><span class="True">    3486:</span></a>         <span class="b">PyErr_SetString</span><span class="f">(</span><span class="b">PyExc_RuntimeError</span><span class="f">,</span>
<a name="3487" /><a href="dictobject.c.html#3487"><span class="True">    3487:</span></a>                         <span class="e">&quot;dictionary changed size during iteration&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3488" /><a href="dictobject.c.html#3488"><span class="True">    3488:</span></a>         <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_used</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span> <span class="k">/* Make this state sticky */</span>
<a name="3489" /><a href="dictobject.c.html#3489"><span class="True">    3489:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3490" /><a href="dictobject.c.html#3490"><span class="True">    3490:</span></a>     <span class="f">}</span>
<a name="3491" /><span class="True">    3491:</span> 
<a name="3492" /><a href="dictobject.c.html#3492"><span class="True">    3492:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_pos</span><span class="f">;</span>
<a name="3493" /><a href="dictobject.c.html#3493"><span class="True">    3493:</span></a>     <span class="b">k</span> <span class="f">=</span> <span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">;</span>
<a name="3494" /><a href="dictobject.c.html#3494"><span class="True">    3494:</span></a>     <span class="b">n</span> <span class="f">=</span> <span class="b">k</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="3495" /><a href="dictobject.c.html#3495"><span class="True">    3495:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span> <span class="f">{</span>
<a name="3496" /><a href="dictobject.c.html#3496"><span class="True">    3496:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="3497" /><a href="dictobject.c.html#3497"><span class="True">    3497:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span> <span class="f">&amp;&amp;</span> <span class="f">*</span><span class="b">value_ptr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3498" /><a href="dictobject.c.html#3498"><span class="True">    3498:</span></a>             <span class="b">value_ptr</span><span class="f">++</span><span class="f">;</span>
<a name="3499" /><a href="dictobject.c.html#3499"><span class="True">    3499:</span></a>             <span class="b">i</span><span class="f">++</span><span class="f">;</span>
<a name="3500" /><a href="dictobject.c.html#3500"><span class="True">    3500:</span></a>         <span class="f">}</span>
<a name="3501" /><a href="dictobject.c.html#3501"><span class="True">    3501:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="b">n</span><span class="f">)</span>
<a name="3502" /><a href="dictobject.c.html#3502"><span class="True">    3502:</span></a>             <span class="m">goto</span> <span class="b">fail</span><span class="f">;</span>
<a name="3503" /><a href="dictobject.c.html#3503"><span class="True">    3503:</span></a>         <span class="b">key</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">k</span><span class="f">)</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_key</span><span class="f">;</span>
<a name="3504" /><a href="dictobject.c.html#3504"><span class="True">    3504:</span></a>     <span class="f">}</span>
<a name="3505" /><a href="dictobject.c.html#3505"><span class="True">    3505:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="3506" /><a href="dictobject.c.html#3506"><span class="True">    3506:</span></a>         <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">entry_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">k</span><span class="f">)</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="3507" /><a href="dictobject.c.html#3507"><span class="True">    3507:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span> <span class="f">&amp;&amp;</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3508" /><a href="dictobject.c.html#3508"><span class="True">    3508:</span></a>             <span class="b">entry_ptr</span><span class="f">++</span><span class="f">;</span>
<a name="3509" /><a href="dictobject.c.html#3509"><span class="True">    3509:</span></a>             <span class="b">i</span><span class="f">++</span><span class="f">;</span>
<a name="3510" /><a href="dictobject.c.html#3510"><span class="True">    3510:</span></a>         <span class="f">}</span>
<a name="3511" /><a href="dictobject.c.html#3511"><span class="True">    3511:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="b">n</span><span class="f">)</span>
<a name="3512" /><a href="dictobject.c.html#3512"><span class="True">    3512:</span></a>             <span class="m">goto</span> <span class="b">fail</span><span class="f">;</span>
<a name="3513" /><a href="dictobject.c.html#3513"><span class="True">    3513:</span></a>         <span class="b">key</span> <span class="f">=</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="3514" /><a href="dictobject.c.html#3514"><span class="True">    3514:</span></a>     <span class="f">}</span>
<a name="3515" /><a href="dictobject.c.html#3515"><span class="True">    3515:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_pos</span> <span class="f">=</span> <span class="b">i</span><span class="f">+</span><span class="c">1</span><span class="f">;</span>
<a name="3516" /><a href="dictobject.c.html#3516"><span class="True">    3516:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">len</span><span class="f">--</span><span class="f">;</span>
<a name="3517" /><a href="dictobject.c.html#3517"><span class="True">    3517:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="3518" /><a href="dictobject.c.html#3518"><span class="True">    3518:</span></a>     <span class="m">return</span> <span class="b">key</span><span class="f">;</span>
<a name="3519" /><span class="True">    3519:</span> 
<a name="3520" /><a href="dictobject.c.html#3520"><span class="True">    3520:</span></a> <span class="b">fail</span><span class="f">:</span>
<a name="3521" /><a href="dictobject.c.html#3521"><span class="True">    3521:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3522" /><a href="dictobject.c.html#3522"><span class="True">    3522:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="3523" /><a href="dictobject.c.html#3523"><span class="True">    3523:</span></a>     <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3524" /><a href="dictobject.c.html#3524"><span class="True">    3524:</span></a> <span class="f">}</span>
<a name="3525" /><span class="True">    3525:</span> 
<a name="3526" /><a href="dictobject.c.html#3526"><span class="True">    3526:</span></a> <span class="b">PyTypeObject</span> <span class="b">PyDictIterKey_Type</span> <span class="f">=</span> <span class="f">{</span>
<a name="3527" /><a href="dictobject.c.html#3527"><span class="True">    3527:</span></a>     <a href="macros_ref.html#_UHlWYXJPYmplY3RfSEVBRF9JTklUXzA_"><span class="b">PyVarObject_HEAD_INIT</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">PyType_Type</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="3528" /><a href="dictobject.c.html#3528"><span class="True">    3528:</span></a>     <span class="e">&quot;dict_keyiterator&quot;</span><span class="f">,</span>                         <span class="k">/* tp_name */</span>
<a name="3529" /><a href="dictobject.c.html#3529"><span class="True">    3529:</span></a>     <span class="m">sizeof</span><span class="f">(</span><span class="b">dictiterobject</span><span class="f">)</span><span class="f">,</span>                     <span class="k">/* tp_basicsize */</span>
<a name="3530" /><a href="dictobject.c.html#3530"><span class="True">    3530:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_itemsize */</span>
<a name="3531" /><span class="True">    3531:</span>     <span class="k">/* methods */</span>
<a name="3532" /><a href="dictobject.c.html#3532"><span class="True">    3532:</span></a>     <span class="f">(</span><span class="b">destructor</span><span class="f">)</span><span class="b">dictiter_dealloc</span><span class="f">,</span>               <span class="k">/* tp_dealloc */</span>
<a name="3533" /><a href="dictobject.c.html#3533"><span class="True">    3533:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_print */</span>
<a name="3534" /><a href="dictobject.c.html#3534"><span class="True">    3534:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_getattr */</span>
<a name="3535" /><a href="dictobject.c.html#3535"><span class="True">    3535:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattr */</span>
<a name="3536" /><a href="dictobject.c.html#3536"><span class="True">    3536:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_reserved */</span>
<a name="3537" /><a href="dictobject.c.html#3537"><span class="True">    3537:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_repr */</span>
<a name="3538" /><a href="dictobject.c.html#3538"><span class="True">    3538:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_number */</span>
<a name="3539" /><a href="dictobject.c.html#3539"><span class="True">    3539:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_sequence */</span>
<a name="3540" /><a href="dictobject.c.html#3540"><span class="True">    3540:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_mapping */</span>
<a name="3541" /><a href="dictobject.c.html#3541"><span class="True">    3541:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_hash */</span>
<a name="3542" /><a href="dictobject.c.html#3542"><span class="True">    3542:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_call */</span>
<a name="3543" /><a href="dictobject.c.html#3543"><span class="True">    3543:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_str */</span>
<a name="3544" /><a href="dictobject.c.html#3544"><span class="True">    3544:</span></a>     <span class="b">PyObject_GenericGetAttr</span><span class="f">,</span>                    <span class="k">/* tp_getattro */</span>
<a name="3545" /><a href="dictobject.c.html#3545"><span class="True">    3545:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattro */</span>
<a name="3546" /><a href="dictobject.c.html#3546"><span class="True">    3546:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_buffer */</span>
<a name="3547" /><a href="dictobject.c.html#3547"><span class="True">    3547:</span></a>     <a href="macros_ref.html#_UHlfVFBGTEFHU19ERUZBVUxUXzA_"><span class="b">Py_TPFLAGS_DEFAULT</span></a> <span class="f">|</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19IQVZFX0dDXzA_"><span class="b">Py_TPFLAGS_HAVE_GC</span></a><span class="f">,</span><span class="k">/* tp_flags */</span>
<a name="3548" /><a href="dictobject.c.html#3548"><span class="True">    3548:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_doc */</span>
<a name="3549" /><a href="dictobject.c.html#3549"><span class="True">    3549:</span></a>     <span class="f">(</span><span class="b">traverseproc</span><span class="f">)</span><span class="b">dictiter_traverse</span><span class="f">,</span>            <span class="k">/* tp_traverse */</span>
<a name="3550" /><a href="dictobject.c.html#3550"><span class="True">    3550:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_clear */</span>
<a name="3551" /><a href="dictobject.c.html#3551"><span class="True">    3551:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_richcompare */</span>
<a name="3552" /><a href="dictobject.c.html#3552"><span class="True">    3552:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_weaklistoffset */</span>
<a name="3553" /><a href="dictobject.c.html#3553"><span class="True">    3553:</span></a>     <span class="b">PyObject_SelfIter</span><span class="f">,</span>                          <span class="k">/* tp_iter */</span>
<a name="3554" /><a href="dictobject.c.html#3554"><span class="True">    3554:</span></a>     <span class="f">(</span><span class="b">iternextfunc</span><span class="f">)</span><span class="b">dictiter_iternextkey</span><span class="f">,</span>         <span class="k">/* tp_iternext */</span>
<a name="3555" /><a href="dictobject.c.html#3555"><span class="True">    3555:</span></a>     <span class="b">dictiter_methods</span><span class="f">,</span>                           <span class="k">/* tp_methods */</span>
<a name="3556" /><a href="dictobject.c.html#3556"><span class="True">    3556:</span></a>     <span class="c">0</span><span class="f">,</span>
<a name="3557" /><a href="dictobject.c.html#3557"><span class="True">    3557:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="3558" /><span class="True">    3558:</span> 
<a name="3559" /><a href="dictobject.c.html#3559"><span class="True">    3559:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3560" /><a href="dictobject.c.html#3560"><span class="True">    3560:</span></a> <span class="b">dictiter_iternextvalue</span><span class="f">(</span><span class="b">dictiterobject</span> <span class="f">*</span><span class="b">di</span><span class="f">)</span>
<a name="3561" /><a href="dictobject.c.html#3561"><span class="True">    3561:</span></a> <span class="f">{</span>
<a name="3562" /><a href="dictobject.c.html#3562"><span class="True">    3562:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">;</span>
<a name="3563" /><a href="dictobject.c.html#3563"><span class="True">    3563:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="3564" /><a href="dictobject.c.html#3564"><span class="True">    3564:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">d</span> <span class="f">=</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span><span class="f">;</span>
<a name="3565" /><span class="True">    3565:</span> 
<a name="3566" /><a href="dictobject.c.html#3566"><span class="True">    3566:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">d</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3567" /><a href="dictobject.c.html#3567"><span class="True">    3567:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3568" /><a href="dictobject.c.html#3568"><span class="True">    3568:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a> <span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="3569" /><span class="True">    3569:</span> 
<a name="3570" /><a href="dictobject.c.html#3570"><span class="True">    3570:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">di</span><span class="f">-&gt;</span><span class="b">di_used</span> <span class="f">!=</span> <span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span> <span class="f">{</span>
<a name="3571" /><a href="dictobject.c.html#3571"><span class="True">    3571:</span></a>         <span class="b">PyErr_SetString</span><span class="f">(</span><span class="b">PyExc_RuntimeError</span><span class="f">,</span>
<a name="3572" /><a href="dictobject.c.html#3572"><span class="True">    3572:</span></a>                         <span class="e">&quot;dictionary changed size during iteration&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3573" /><a href="dictobject.c.html#3573"><span class="True">    3573:</span></a>         <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_used</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span> <span class="k">/* Make this state sticky */</span>
<a name="3574" /><a href="dictobject.c.html#3574"><span class="True">    3574:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3575" /><a href="dictobject.c.html#3575"><span class="True">    3575:</span></a>     <span class="f">}</span>
<a name="3576" /><span class="True">    3576:</span> 
<a name="3577" /><a href="dictobject.c.html#3577"><span class="True">    3577:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_pos</span><span class="f">;</span>
<a name="3578" /><a href="dictobject.c.html#3578"><span class="True">    3578:</span></a>     <span class="b">n</span> <span class="f">=</span> <span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="3579" /><a href="dictobject.c.html#3579"><span class="True">    3579:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span> <span class="f">{</span>
<a name="3580" /><a href="dictobject.c.html#3580"><span class="True">    3580:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="3581" /><a href="dictobject.c.html#3581"><span class="True">    3581:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span> <span class="f">&amp;&amp;</span> <span class="f">*</span><span class="b">value_ptr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3582" /><a href="dictobject.c.html#3582"><span class="True">    3582:</span></a>             <span class="b">value_ptr</span><span class="f">++</span><span class="f">;</span>
<a name="3583" /><a href="dictobject.c.html#3583"><span class="True">    3583:</span></a>             <span class="b">i</span><span class="f">++</span><span class="f">;</span>
<a name="3584" /><a href="dictobject.c.html#3584"><span class="True">    3584:</span></a>         <span class="f">}</span>
<a name="3585" /><a href="dictobject.c.html#3585"><span class="True">    3585:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="b">n</span><span class="f">)</span>
<a name="3586" /><a href="dictobject.c.html#3586"><span class="True">    3586:</span></a>             <span class="m">goto</span> <span class="b">fail</span><span class="f">;</span>
<a name="3587" /><a href="dictobject.c.html#3587"><span class="True">    3587:</span></a>         <span class="b">value</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_ptr</span><span class="f">;</span>
<a name="3588" /><a href="dictobject.c.html#3588"><span class="True">    3588:</span></a>     <span class="f">}</span>
<a name="3589" /><a href="dictobject.c.html#3589"><span class="True">    3589:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="3590" /><a href="dictobject.c.html#3590"><span class="True">    3590:</span></a>         <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">entry_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="3591" /><a href="dictobject.c.html#3591"><span class="True">    3591:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span> <span class="f">&amp;&amp;</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3592" /><a href="dictobject.c.html#3592"><span class="True">    3592:</span></a>             <span class="b">entry_ptr</span><span class="f">++</span><span class="f">;</span>
<a name="3593" /><a href="dictobject.c.html#3593"><span class="True">    3593:</span></a>             <span class="b">i</span><span class="f">++</span><span class="f">;</span>
<a name="3594" /><a href="dictobject.c.html#3594"><span class="True">    3594:</span></a>         <span class="f">}</span>
<a name="3595" /><a href="dictobject.c.html#3595"><span class="True">    3595:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="b">n</span><span class="f">)</span>
<a name="3596" /><a href="dictobject.c.html#3596"><span class="True">    3596:</span></a>             <span class="m">goto</span> <span class="b">fail</span><span class="f">;</span>
<a name="3597" /><a href="dictobject.c.html#3597"><span class="True">    3597:</span></a>         <span class="b">value</span> <span class="f">=</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="3598" /><a href="dictobject.c.html#3598"><span class="True">    3598:</span></a>     <span class="f">}</span>
<a name="3599" /><a href="dictobject.c.html#3599"><span class="True">    3599:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_pos</span> <span class="f">=</span> <span class="b">i</span><span class="f">+</span><span class="c">1</span><span class="f">;</span>
<a name="3600" /><a href="dictobject.c.html#3600"><span class="True">    3600:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">len</span><span class="f">--</span><span class="f">;</span>
<a name="3601" /><a href="dictobject.c.html#3601"><span class="True">    3601:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="3602" /><a href="dictobject.c.html#3602"><span class="True">    3602:</span></a>     <span class="m">return</span> <span class="b">value</span><span class="f">;</span>
<a name="3603" /><span class="True">    3603:</span> 
<a name="3604" /><a href="dictobject.c.html#3604"><span class="True">    3604:</span></a> <span class="b">fail</span><span class="f">:</span>
<a name="3605" /><a href="dictobject.c.html#3605"><span class="True">    3605:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3606" /><a href="dictobject.c.html#3606"><span class="True">    3606:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="3607" /><a href="dictobject.c.html#3607"><span class="True">    3607:</span></a>     <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3608" /><a href="dictobject.c.html#3608"><span class="True">    3608:</span></a> <span class="f">}</span>
<a name="3609" /><span class="True">    3609:</span> 
<a name="3610" /><a href="dictobject.c.html#3610"><span class="True">    3610:</span></a> <span class="b">PyTypeObject</span> <span class="b">PyDictIterValue_Type</span> <span class="f">=</span> <span class="f">{</span>
<a name="3611" /><a href="dictobject.c.html#3611"><span class="True">    3611:</span></a>     <a href="macros_ref.html#_UHlWYXJPYmplY3RfSEVBRF9JTklUXzA_"><span class="b">PyVarObject_HEAD_INIT</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">PyType_Type</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="3612" /><a href="dictobject.c.html#3612"><span class="True">    3612:</span></a>     <span class="e">&quot;dict_valueiterator&quot;</span><span class="f">,</span>                       <span class="k">/* tp_name */</span>
<a name="3613" /><a href="dictobject.c.html#3613"><span class="True">    3613:</span></a>     <span class="m">sizeof</span><span class="f">(</span><span class="b">dictiterobject</span><span class="f">)</span><span class="f">,</span>                     <span class="k">/* tp_basicsize */</span>
<a name="3614" /><a href="dictobject.c.html#3614"><span class="True">    3614:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_itemsize */</span>
<a name="3615" /><span class="True">    3615:</span>     <span class="k">/* methods */</span>
<a name="3616" /><a href="dictobject.c.html#3616"><span class="True">    3616:</span></a>     <span class="f">(</span><span class="b">destructor</span><span class="f">)</span><span class="b">dictiter_dealloc</span><span class="f">,</span>               <span class="k">/* tp_dealloc */</span>
<a name="3617" /><a href="dictobject.c.html#3617"><span class="True">    3617:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_print */</span>
<a name="3618" /><a href="dictobject.c.html#3618"><span class="True">    3618:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_getattr */</span>
<a name="3619" /><a href="dictobject.c.html#3619"><span class="True">    3619:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattr */</span>
<a name="3620" /><a href="dictobject.c.html#3620"><span class="True">    3620:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_reserved */</span>
<a name="3621" /><a href="dictobject.c.html#3621"><span class="True">    3621:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_repr */</span>
<a name="3622" /><a href="dictobject.c.html#3622"><span class="True">    3622:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_number */</span>
<a name="3623" /><a href="dictobject.c.html#3623"><span class="True">    3623:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_sequence */</span>
<a name="3624" /><a href="dictobject.c.html#3624"><span class="True">    3624:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_mapping */</span>
<a name="3625" /><a href="dictobject.c.html#3625"><span class="True">    3625:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_hash */</span>
<a name="3626" /><a href="dictobject.c.html#3626"><span class="True">    3626:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_call */</span>
<a name="3627" /><a href="dictobject.c.html#3627"><span class="True">    3627:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_str */</span>
<a name="3628" /><a href="dictobject.c.html#3628"><span class="True">    3628:</span></a>     <span class="b">PyObject_GenericGetAttr</span><span class="f">,</span>                    <span class="k">/* tp_getattro */</span>
<a name="3629" /><a href="dictobject.c.html#3629"><span class="True">    3629:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattro */</span>
<a name="3630" /><a href="dictobject.c.html#3630"><span class="True">    3630:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_buffer */</span>
<a name="3631" /><a href="dictobject.c.html#3631"><span class="True">    3631:</span></a>     <a href="macros_ref.html#_UHlfVFBGTEFHU19ERUZBVUxUXzA_"><span class="b">Py_TPFLAGS_DEFAULT</span></a> <span class="f">|</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19IQVZFX0dDXzA_"><span class="b">Py_TPFLAGS_HAVE_GC</span></a><span class="f">,</span>    <span class="k">/* tp_flags */</span>
<a name="3632" /><a href="dictobject.c.html#3632"><span class="True">    3632:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_doc */</span>
<a name="3633" /><a href="dictobject.c.html#3633"><span class="True">    3633:</span></a>     <span class="f">(</span><span class="b">traverseproc</span><span class="f">)</span><span class="b">dictiter_traverse</span><span class="f">,</span>            <span class="k">/* tp_traverse */</span>
<a name="3634" /><a href="dictobject.c.html#3634"><span class="True">    3634:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_clear */</span>
<a name="3635" /><a href="dictobject.c.html#3635"><span class="True">    3635:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_richcompare */</span>
<a name="3636" /><a href="dictobject.c.html#3636"><span class="True">    3636:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_weaklistoffset */</span>
<a name="3637" /><a href="dictobject.c.html#3637"><span class="True">    3637:</span></a>     <span class="b">PyObject_SelfIter</span><span class="f">,</span>                          <span class="k">/* tp_iter */</span>
<a name="3638" /><a href="dictobject.c.html#3638"><span class="True">    3638:</span></a>     <span class="f">(</span><span class="b">iternextfunc</span><span class="f">)</span><span class="b">dictiter_iternextvalue</span><span class="f">,</span>       <span class="k">/* tp_iternext */</span>
<a name="3639" /><a href="dictobject.c.html#3639"><span class="True">    3639:</span></a>     <span class="b">dictiter_methods</span><span class="f">,</span>                           <span class="k">/* tp_methods */</span>
<a name="3640" /><a href="dictobject.c.html#3640"><span class="True">    3640:</span></a>     <span class="c">0</span><span class="f">,</span>
<a name="3641" /><a href="dictobject.c.html#3641"><span class="True">    3641:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="3642" /><span class="True">    3642:</span> 
<a name="3643" /><a href="dictobject.c.html#3643"><span class="True">    3643:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3644" /><a href="dictobject.c.html#3644"><span class="True">    3644:</span></a> <span class="b">dictiter_iternextitem</span><span class="f">(</span><span class="b">dictiterobject</span> <span class="f">*</span><span class="b">di</span><span class="f">)</span>
<a name="3645" /><a href="dictobject.c.html#3645"><span class="True">    3645:</span></a> <span class="f">{</span>
<a name="3646" /><a href="dictobject.c.html#3646"><span class="True">    3646:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="f">*</span><span class="b">value</span><span class="f">,</span> <span class="f">*</span><span class="b">result</span><span class="f">;</span>
<a name="3647" /><a href="dictobject.c.html#3647"><span class="True">    3647:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">i</span><span class="f">,</span> <span class="b">n</span><span class="f">;</span>
<a name="3648" /><a href="dictobject.c.html#3648"><span class="True">    3648:</span></a>     <span class="b">PyDictObject</span> <span class="f">*</span><span class="b">d</span> <span class="f">=</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span><span class="f">;</span>
<a name="3649" /><span class="True">    3649:</span> 
<a name="3650" /><a href="dictobject.c.html#3650"><span class="True">    3650:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">d</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3651" /><a href="dictobject.c.html#3651"><span class="True">    3651:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3652" /><a href="dictobject.c.html#3652"><span class="True">    3652:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a> <span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="3653" /><span class="True">    3653:</span> 
<a name="3654" /><a href="dictobject.c.html#3654"><span class="True">    3654:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">di</span><span class="f">-&gt;</span><span class="b">di_used</span> <span class="f">!=</span> <span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">)</span> <span class="f">{</span>
<a name="3655" /><a href="dictobject.c.html#3655"><span class="True">    3655:</span></a>         <span class="b">PyErr_SetString</span><span class="f">(</span><span class="b">PyExc_RuntimeError</span><span class="f">,</span>
<a name="3656" /><a href="dictobject.c.html#3656"><span class="True">    3656:</span></a>                         <span class="e">&quot;dictionary changed size during iteration&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="3657" /><a href="dictobject.c.html#3657"><span class="True">    3657:</span></a>         <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_used</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span> <span class="k">/* Make this state sticky */</span>
<a name="3658" /><a href="dictobject.c.html#3658"><span class="True">    3658:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3659" /><a href="dictobject.c.html#3659"><span class="True">    3659:</span></a>     <span class="f">}</span>
<a name="3660" /><span class="True">    3660:</span> 
<a name="3661" /><a href="dictobject.c.html#3661"><span class="True">    3661:</span></a>     <span class="b">i</span> <span class="f">=</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_pos</span><span class="f">;</span>
<a name="3662" /><a href="dictobject.c.html#3662"><span class="True">    3662:</span></a>     <span class="b">n</span> <span class="f">=</span> <span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">-&gt;</span><span class="b">dk_nentries</span><span class="f">;</span>
<a name="3663" /><a href="dictobject.c.html#3663"><span class="True">    3663:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">)</span> <span class="f">{</span>
<a name="3664" /><a href="dictobject.c.html#3664"><span class="True">    3664:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">value_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_values</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="3665" /><a href="dictobject.c.html#3665"><span class="True">    3665:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span> <span class="f">&amp;&amp;</span> <span class="f">*</span><span class="b">value_ptr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3666" /><a href="dictobject.c.html#3666"><span class="True">    3666:</span></a>             <span class="b">value_ptr</span><span class="f">++</span><span class="f">;</span>
<a name="3667" /><a href="dictobject.c.html#3667"><span class="True">    3667:</span></a>             <span class="b">i</span><span class="f">++</span><span class="f">;</span>
<a name="3668" /><a href="dictobject.c.html#3668"><span class="True">    3668:</span></a>         <span class="f">}</span>
<a name="3669" /><a href="dictobject.c.html#3669"><span class="True">    3669:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="b">n</span><span class="f">)</span>
<a name="3670" /><a href="dictobject.c.html#3670"><span class="True">    3670:</span></a>             <span class="m">goto</span> <span class="b">fail</span><span class="f">;</span>
<a name="3671" /><a href="dictobject.c.html#3671"><span class="True">    3671:</span></a>         <span class="b">key</span> <span class="f">=</span> <a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">.</span><span class="b">me_key</span><span class="f">;</span>
<a name="3672" /><a href="dictobject.c.html#3672"><span class="True">    3672:</span></a>         <span class="b">value</span> <span class="f">=</span> <span class="f">*</span><span class="b">value_ptr</span><span class="f">;</span>
<a name="3673" /><a href="dictobject.c.html#3673"><span class="True">    3673:</span></a>     <span class="f">}</span>
<a name="3674" /><a href="dictobject.c.html#3674"><span class="True">    3674:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="3675" /><a href="dictobject.c.html#3675"><span class="True">    3675:</span></a>         <span class="b">PyDictKeyEntry</span> <span class="f">*</span><span class="b">entry_ptr</span> <span class="f">=</span> <span class="f">&amp;</span><a href="macros_ref.html#_REtfRU5UUklFU18w"><span class="b">DK_ENTRIES</span></a><span class="f">(</span><span class="b">d</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">[</span><span class="b">i</span><span class="f">]</span><span class="f">;</span>
<a name="3676" /><a href="dictobject.c.html#3676"><span class="True">    3676:</span></a>         <span class="m">while</span> <span class="f">(</span><span class="b">i</span> <span class="f">&lt;</span> <span class="b">n</span> <span class="f">&amp;&amp;</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3677" /><a href="dictobject.c.html#3677"><span class="True">    3677:</span></a>             <span class="b">entry_ptr</span><span class="f">++</span><span class="f">;</span>
<a name="3678" /><a href="dictobject.c.html#3678"><span class="True">    3678:</span></a>             <span class="b">i</span><span class="f">++</span><span class="f">;</span>
<a name="3679" /><a href="dictobject.c.html#3679"><span class="True">    3679:</span></a>         <span class="f">}</span>
<a name="3680" /><a href="dictobject.c.html#3680"><span class="True">    3680:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">i</span> <span class="f">&gt;=</span> <span class="b">n</span><span class="f">)</span>
<a name="3681" /><a href="dictobject.c.html#3681"><span class="True">    3681:</span></a>             <span class="m">goto</span> <span class="b">fail</span><span class="f">;</span>
<a name="3682" /><a href="dictobject.c.html#3682"><span class="True">    3682:</span></a>         <span class="b">key</span> <span class="f">=</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_key</span><span class="f">;</span>
<a name="3683" /><a href="dictobject.c.html#3683"><span class="True">    3683:</span></a>         <span class="b">value</span> <span class="f">=</span> <span class="b">entry_ptr</span><span class="f">-&gt;</span><span class="b">me_value</span><span class="f">;</span>
<a name="3684" /><a href="dictobject.c.html#3684"><span class="True">    3684:</span></a>     <span class="f">}</span>
<a name="3685" /><a href="dictobject.c.html#3685"><span class="True">    3685:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_pos</span> <span class="f">=</span> <span class="b">i</span><span class="f">+</span><span class="c">1</span><span class="f">;</span>
<a name="3686" /><a href="dictobject.c.html#3686"><span class="True">    3686:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">len</span><span class="f">--</span><span class="f">;</span>
<a name="3687" /><a href="dictobject.c.html#3687"><span class="True">    3687:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="3688" /><a href="dictobject.c.html#3688"><span class="True">    3688:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="3689" /><a href="dictobject.c.html#3689"><span class="True">    3689:</span></a>     <span class="b">result</span> <span class="f">=</span> <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_result</span><span class="f">;</span>
<a name="3690" /><a href="dictobject.c.html#3690"><span class="True">    3690:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlfUkVGQ05UXzA_"><span class="b">Py_REFCNT</span></a><span class="f">(</span><span class="b">result</span><span class="f">)</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="3691" /><a href="dictobject.c.html#3691"><span class="True">    3691:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">oldkey</span> <span class="f">=</span> <a href="macros_ref.html#_UHlUdXBsZV9HRVRfSVRFTV8w"><span class="b">PyTuple_GET_ITEM</span></a><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="3692" /><a href="dictobject.c.html#3692"><span class="True">    3692:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">oldvalue</span> <span class="f">=</span> <a href="macros_ref.html#_UHlUdXBsZV9HRVRfSVRFTV8w"><span class="b">PyTuple_GET_ITEM</span></a><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="3693" /><a href="dictobject.c.html#3693"><span class="True">    3693:</span></a>         <a href="macros_ref.html#_UHlUdXBsZV9TRVRfSVRFTV8w"><span class="b">PyTuple_SET_ITEM</span></a><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">;</span>  <span class="k">/* steals reference */</span>
<a name="3694" /><a href="dictobject.c.html#3694"><span class="True">    3694:</span></a>         <a href="macros_ref.html#_UHlUdXBsZV9TRVRfSVRFTV8w"><span class="b">PyTuple_SET_ITEM</span></a><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>  <span class="k">/* steals reference */</span>
<a name="3695" /><a href="dictobject.c.html#3695"><span class="True">    3695:</span></a>         <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">result</span><span class="f">)</span><span class="f">;</span>
<a name="3696" /><a href="dictobject.c.html#3696"><span class="True">    3696:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">oldkey</span><span class="f">)</span><span class="f">;</span>
<a name="3697" /><a href="dictobject.c.html#3697"><span class="True">    3697:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">oldvalue</span><span class="f">)</span><span class="f">;</span>
<a name="3698" /><a href="dictobject.c.html#3698"><span class="True">    3698:</span></a>     <span class="f">}</span>
<a name="3699" /><a href="dictobject.c.html#3699"><span class="True">    3699:</span></a>     <span class="m">else</span> <span class="f">{</span>
<a name="3700" /><a href="dictobject.c.html#3700"><span class="True">    3700:</span></a>         <span class="b">result</span> <span class="f">=</span> <span class="b">PyTuple_New</span><span class="f">(</span><span class="c">2</span><span class="f">)</span><span class="f">;</span>
<a name="3701" /><a href="dictobject.c.html#3701"><span class="True">    3701:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">result</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3702" /><a href="dictobject.c.html#3702"><span class="True">    3702:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3703" /><a href="dictobject.c.html#3703"><span class="True">    3703:</span></a>         <a href="macros_ref.html#_UHlUdXBsZV9TRVRfSVRFTV8w"><span class="b">PyTuple_SET_ITEM</span></a><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="c">0</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">;</span>  <span class="k">/* steals reference */</span>
<a name="3704" /><a href="dictobject.c.html#3704"><span class="True">    3704:</span></a>         <a href="macros_ref.html#_UHlUdXBsZV9TRVRfSVRFTV8w"><span class="b">PyTuple_SET_ITEM</span></a><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>  <span class="k">/* steals reference */</span>
<a name="3705" /><a href="dictobject.c.html#3705"><span class="True">    3705:</span></a>     <span class="f">}</span>
<a name="3706" /><a href="dictobject.c.html#3706"><span class="True">    3706:</span></a>     <span class="m">return</span> <span class="b">result</span><span class="f">;</span>
<a name="3707" /><span class="True">    3707:</span> 
<a name="3708" /><a href="dictobject.c.html#3708"><span class="True">    3708:</span></a> <span class="b">fail</span><span class="f">:</span>
<a name="3709" /><a href="dictobject.c.html#3709"><span class="True">    3709:</span></a>     <span class="b">di</span><span class="f">-&gt;</span><span class="b">di_dict</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3710" /><a href="dictobject.c.html#3710"><span class="True">    3710:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">d</span><span class="f">)</span><span class="f">;</span>
<a name="3711" /><a href="dictobject.c.html#3711"><span class="True">    3711:</span></a>     <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3712" /><a href="dictobject.c.html#3712"><span class="True">    3712:</span></a> <span class="f">}</span>
<a name="3713" /><span class="True">    3713:</span> 
<a name="3714" /><a href="dictobject.c.html#3714"><span class="True">    3714:</span></a> <span class="b">PyTypeObject</span> <span class="b">PyDictIterItem_Type</span> <span class="f">=</span> <span class="f">{</span>
<a name="3715" /><a href="dictobject.c.html#3715"><span class="True">    3715:</span></a>     <a href="macros_ref.html#_UHlWYXJPYmplY3RfSEVBRF9JTklUXzA_"><span class="b">PyVarObject_HEAD_INIT</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">PyType_Type</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="3716" /><a href="dictobject.c.html#3716"><span class="True">    3716:</span></a>     <span class="e">&quot;dict_itemiterator&quot;</span><span class="f">,</span>                        <span class="k">/* tp_name */</span>
<a name="3717" /><a href="dictobject.c.html#3717"><span class="True">    3717:</span></a>     <span class="m">sizeof</span><span class="f">(</span><span class="b">dictiterobject</span><span class="f">)</span><span class="f">,</span>                     <span class="k">/* tp_basicsize */</span>
<a name="3718" /><a href="dictobject.c.html#3718"><span class="True">    3718:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_itemsize */</span>
<a name="3719" /><span class="True">    3719:</span>     <span class="k">/* methods */</span>
<a name="3720" /><a href="dictobject.c.html#3720"><span class="True">    3720:</span></a>     <span class="f">(</span><span class="b">destructor</span><span class="f">)</span><span class="b">dictiter_dealloc</span><span class="f">,</span>               <span class="k">/* tp_dealloc */</span>
<a name="3721" /><a href="dictobject.c.html#3721"><span class="True">    3721:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_print */</span>
<a name="3722" /><a href="dictobject.c.html#3722"><span class="True">    3722:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_getattr */</span>
<a name="3723" /><a href="dictobject.c.html#3723"><span class="True">    3723:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattr */</span>
<a name="3724" /><a href="dictobject.c.html#3724"><span class="True">    3724:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_reserved */</span>
<a name="3725" /><a href="dictobject.c.html#3725"><span class="True">    3725:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_repr */</span>
<a name="3726" /><a href="dictobject.c.html#3726"><span class="True">    3726:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_number */</span>
<a name="3727" /><a href="dictobject.c.html#3727"><span class="True">    3727:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_sequence */</span>
<a name="3728" /><a href="dictobject.c.html#3728"><span class="True">    3728:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_mapping */</span>
<a name="3729" /><a href="dictobject.c.html#3729"><span class="True">    3729:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_hash */</span>
<a name="3730" /><a href="dictobject.c.html#3730"><span class="True">    3730:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_call */</span>
<a name="3731" /><a href="dictobject.c.html#3731"><span class="True">    3731:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_str */</span>
<a name="3732" /><a href="dictobject.c.html#3732"><span class="True">    3732:</span></a>     <span class="b">PyObject_GenericGetAttr</span><span class="f">,</span>                    <span class="k">/* tp_getattro */</span>
<a name="3733" /><a href="dictobject.c.html#3733"><span class="True">    3733:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattro */</span>
<a name="3734" /><a href="dictobject.c.html#3734"><span class="True">    3734:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_buffer */</span>
<a name="3735" /><a href="dictobject.c.html#3735"><span class="True">    3735:</span></a>     <a href="macros_ref.html#_UHlfVFBGTEFHU19ERUZBVUxUXzA_"><span class="b">Py_TPFLAGS_DEFAULT</span></a> <span class="f">|</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19IQVZFX0dDXzA_"><span class="b">Py_TPFLAGS_HAVE_GC</span></a><span class="f">,</span><span class="k">/* tp_flags */</span>
<a name="3736" /><a href="dictobject.c.html#3736"><span class="True">    3736:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_doc */</span>
<a name="3737" /><a href="dictobject.c.html#3737"><span class="True">    3737:</span></a>     <span class="f">(</span><span class="b">traverseproc</span><span class="f">)</span><span class="b">dictiter_traverse</span><span class="f">,</span>            <span class="k">/* tp_traverse */</span>
<a name="3738" /><a href="dictobject.c.html#3738"><span class="True">    3738:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_clear */</span>
<a name="3739" /><a href="dictobject.c.html#3739"><span class="True">    3739:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_richcompare */</span>
<a name="3740" /><a href="dictobject.c.html#3740"><span class="True">    3740:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_weaklistoffset */</span>
<a name="3741" /><a href="dictobject.c.html#3741"><span class="True">    3741:</span></a>     <span class="b">PyObject_SelfIter</span><span class="f">,</span>                          <span class="k">/* tp_iter */</span>
<a name="3742" /><a href="dictobject.c.html#3742"><span class="True">    3742:</span></a>     <span class="f">(</span><span class="b">iternextfunc</span><span class="f">)</span><span class="b">dictiter_iternextitem</span><span class="f">,</span>        <span class="k">/* tp_iternext */</span>
<a name="3743" /><a href="dictobject.c.html#3743"><span class="True">    3743:</span></a>     <span class="b">dictiter_methods</span><span class="f">,</span>                           <span class="k">/* tp_methods */</span>
<a name="3744" /><a href="dictobject.c.html#3744"><span class="True">    3744:</span></a>     <span class="c">0</span><span class="f">,</span>
<a name="3745" /><a href="dictobject.c.html#3745"><span class="True">    3745:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="3746" /><span class="True">    3746:</span> 
<a name="3747" /><span class="True">    3747:</span> 
<a name="3748" /><a href="dictobject.c.html#3748"><span class="True">    3748:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3749" /><a href="dictobject.c.html#3749"><span class="True">    3749:</span></a> <span class="b">dictiter_reduce</span><span class="f">(</span><span class="b">dictiterobject</span> <span class="f">*</span><span class="b">di</span><span class="f">)</span>
<a name="3750" /><a href="dictobject.c.html#3750"><span class="True">    3750:</span></a> <span class="f">{</span>
<a name="3751" /><a href="dictobject.c.html#3751"><span class="True">    3751:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">list</span><span class="f">;</span>
<a name="3752" /><a href="dictobject.c.html#3752"><span class="True">    3752:</span></a>     <span class="b">dictiterobject</span> <span class="b">tmp</span><span class="f">;</span>
<a name="3753" /><span class="True">    3753:</span> 
<a name="3754" /><a href="dictobject.c.html#3754"><span class="True">    3754:</span></a>     <span class="b">list</span> <span class="f">=</span> <span class="b">PyList_New</span><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="3755" /><a href="dictobject.c.html#3755"><span class="True">    3755:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">list</span><span class="f">)</span>
<a name="3756" /><a href="dictobject.c.html#3756"><span class="True">    3756:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3757" /><span class="True">    3757:</span> 
<a name="3758" /><span class="True">    3758:</span>     <span class="k">/* copy the itertor state */</span>
<a name="3759" /><a href="dictobject.c.html#3759"><span class="True">    3759:</span></a>     <span class="b">tmp</span> <span class="f">=</span> <span class="f">*</span><span class="b">di</span><span class="f">;</span>
<a name="3760" /><a href="dictobject.c.html#3760"><span class="True">    3760:</span></a>     <a href="macros_ref.html#_UHlfWElOQ1JFRl8w"><span class="b">Py_XINCREF</span></a><span class="f">(</span><span class="b">tmp</span><span class="f">.</span><span class="b">di_dict</span><span class="f">)</span><span class="f">;</span>
<a name="3761" /><span class="True">    3761:</span> 
<a name="3762" /><span class="True">    3762:</span>     <span class="k">/* iterate the temporary into a list */</span>
<a name="3763" /><a href="dictobject.c.html#3763"><span class="True">    3763:</span></a>     <span class="m">for</span><span class="f">(</span><span class="f">;</span><span class="f">;</span><span class="f">)</span> <span class="f">{</span>
<a name="3764" /><a href="dictobject.c.html#3764"><span class="True">    3764:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">element</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="3765" /><a href="dictobject.c.html#3765"><span class="True">    3765:</span></a>         <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlfVFlQRV8w"><span class="b">Py_TYPE</span></a><span class="f">(</span><span class="b">di</span><span class="f">)</span> <span class="f">==</span> <span class="f">&amp;</span><span class="b">PyDictIterItem_Type</span><span class="f">)</span>
<a name="3766" /><a href="dictobject.c.html#3766"><span class="True">    3766:</span></a>             <span class="b">element</span> <span class="f">=</span> <span class="b">dictiter_iternextitem</span><span class="f">(</span><span class="f">&amp;</span><span class="b">tmp</span><span class="f">)</span><span class="f">;</span>
<a name="3767" /><a href="dictobject.c.html#3767"><span class="True">    3767:</span></a>         <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlfVFlQRV8w"><span class="b">Py_TYPE</span></a><span class="f">(</span><span class="b">di</span><span class="f">)</span> <span class="f">==</span> <span class="f">&amp;</span><span class="b">PyDictIterKey_Type</span><span class="f">)</span>
<a name="3768" /><a href="dictobject.c.html#3768"><span class="True">    3768:</span></a>             <span class="b">element</span> <span class="f">=</span> <span class="b">dictiter_iternextkey</span><span class="f">(</span><span class="f">&amp;</span><span class="b">tmp</span><span class="f">)</span><span class="f">;</span>
<a name="3769" /><a href="dictobject.c.html#3769"><span class="True">    3769:</span></a>         <span class="m">else</span> <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlfVFlQRV8w"><span class="b">Py_TYPE</span></a><span class="f">(</span><span class="b">di</span><span class="f">)</span> <span class="f">==</span> <span class="f">&amp;</span><span class="b">PyDictIterValue_Type</span><span class="f">)</span>
<a name="3770" /><a href="dictobject.c.html#3770"><span class="True">    3770:</span></a>             <span class="b">element</span> <span class="f">=</span> <span class="b">dictiter_iternextvalue</span><span class="f">(</span><span class="f">&amp;</span><span class="b">tmp</span><span class="f">)</span><span class="f">;</span>
<a name="3771" /><a href="dictobject.c.html#3771"><span class="True">    3771:</span></a>         <span class="m">else</span>
<a name="3772" /><a href="dictobject.c.html#3772"><span class="True">    3772:</span></a>             <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="3773" /><a href="dictobject.c.html#3773"><span class="True">    3773:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">element</span><span class="f">)</span> <span class="f">{</span>
<a name="3774" /><a href="dictobject.c.html#3774"><span class="True">    3774:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">PyList_Append</span><span class="f">(</span><span class="b">list</span><span class="f">,</span> <span class="b">element</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="3775" /><a href="dictobject.c.html#3775"><span class="True">    3775:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">element</span><span class="f">)</span><span class="f">;</span>
<a name="3776" /><a href="dictobject.c.html#3776"><span class="True">    3776:</span></a>                 <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">list</span><span class="f">)</span><span class="f">;</span>
<a name="3777" /><a href="dictobject.c.html#3777"><span class="True">    3777:</span></a>                 <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">tmp</span><span class="f">.</span><span class="b">di_dict</span><span class="f">)</span><span class="f">;</span>
<a name="3778" /><a href="dictobject.c.html#3778"><span class="True">    3778:</span></a>                 <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3779" /><a href="dictobject.c.html#3779"><span class="True">    3779:</span></a>             <span class="f">}</span>
<a name="3780" /><a href="dictobject.c.html#3780"><span class="True">    3780:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">element</span><span class="f">)</span><span class="f">;</span>
<a name="3781" /><a href="dictobject.c.html#3781"><span class="True">    3781:</span></a>         <span class="f">}</span> <span class="m">else</span>
<a name="3782" /><a href="dictobject.c.html#3782"><span class="True">    3782:</span></a>             <span class="m">break</span><span class="f">;</span>
<a name="3783" /><a href="dictobject.c.html#3783"><span class="True">    3783:</span></a>     <span class="f">}</span>
<a name="3784" /><a href="dictobject.c.html#3784"><span class="True">    3784:</span></a>     <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">tmp</span><span class="f">.</span><span class="b">di_dict</span><span class="f">)</span><span class="f">;</span>
<a name="3785" /><span class="True">    3785:</span>     <span class="k">/* check for error */</span>
<a name="3786" /><a href="dictobject.c.html#3786"><span class="True">    3786:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">tmp</span><span class="f">.</span><span class="b">di_dict</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3787" /><span class="True">    3787:</span>         <span class="k">/* we have an error */</span>
<a name="3788" /><a href="dictobject.c.html#3788"><span class="True">    3788:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">list</span><span class="f">)</span><span class="f">;</span>
<a name="3789" /><a href="dictobject.c.html#3789"><span class="True">    3789:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3790" /><a href="dictobject.c.html#3790"><span class="True">    3790:</span></a>     <span class="f">}</span>
<a name="3791" /><a href="dictobject.c.html#3791"><span class="True">    3791:</span></a>     <span class="m">return</span> <span class="b">Py_BuildValue</span><span class="f">(</span><span class="e">&quot;N(N)&quot;</span><span class="f">,</span> <span class="b">_PyObject_GetBuiltin</span><span class="f">(</span><span class="e">&quot;iter&quot;</span><span class="f">)</span><span class="f">,</span> <span class="b">list</span><span class="f">)</span><span class="f">;</span>
<a name="3792" /><a href="dictobject.c.html#3792"><span class="True">    3792:</span></a> <span class="f">}</span>
<a name="3793" /><span class="True">    3793:</span> 
<a name="3794" /><span class="True">    3794:</span> <span class="k">/***********************************************/</span>
<a name="3795" /><span class="True">    3795:</span> <span class="k">/* View objects for keys(), items(), values(). */</span>
<a name="3796" /><span class="True">    3796:</span> <span class="k">/***********************************************/</span>
<a name="3797" /><span class="True">    3797:</span> 
<a name="3798" /><span class="True">    3798:</span> <span class="k">/* The instance lay-out is the same for all three; but the type differs. */</span>
<a name="3799" /><span class="True">    3799:</span> 
<a name="3800" /><a href="dictobject.c.html#3800"><span class="True">    3800:</span></a> <span class="m">static</span> <span class="m">void</span>
<a name="3801" /><a href="dictobject.c.html#3801"><span class="True">    3801:</span></a> <span class="b">dictview_dealloc</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">)</span>
<a name="3802" /><a href="dictobject.c.html#3802"><span class="True">    3802:</span></a> <span class="f">{</span>
<a name="3803" /><a href="dictobject.c.html#3803"><span class="True">    3803:</span></a>     <a href="macros_ref.html#_UHlfWERFQ1JFRl8w"><span class="b">Py_XDECREF</span></a><span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span><span class="f">)</span><span class="f">;</span>
<a name="3804" /><a href="dictobject.c.html#3804"><span class="True">    3804:</span></a>     <span class="b">PyObject_GC_Del</span><span class="f">(</span><span class="b">dv</span><span class="f">)</span><span class="f">;</span>
<a name="3805" /><a href="dictobject.c.html#3805"><span class="True">    3805:</span></a> <span class="f">}</span>
<a name="3806" /><span class="True">    3806:</span> 
<a name="3807" /><a href="dictobject.c.html#3807"><span class="True">    3807:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="3808" /><a href="dictobject.c.html#3808"><span class="True">    3808:</span></a> <span class="b">dictview_traverse</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">,</span> <span class="b">visitproc</span> <span class="b">visit</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">arg</span><span class="f">)</span>
<a name="3809" /><a href="dictobject.c.html#3809"><span class="True">    3809:</span></a> <span class="f">{</span>
<a name="3810" /><a href="dictobject.c.html#3810"><span class="True">    3810:</span></a>     <a href="macros_ref.html#_UHlfVklTSVRfMA__"><span class="b">Py_VISIT</span></a><span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span><span class="f">)</span><span class="f">;</span>
<a name="3811" /><a href="dictobject.c.html#3811"><span class="True">    3811:</span></a>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="3812" /><a href="dictobject.c.html#3812"><span class="True">    3812:</span></a> <span class="f">}</span>
<a name="3813" /><span class="True">    3813:</span> 
<a name="3814" /><a href="dictobject.c.html#3814"><span class="True">    3814:</span></a> <span class="m">static</span> <span class="b">Py_ssize_t</span>
<a name="3815" /><a href="dictobject.c.html#3815"><span class="True">    3815:</span></a> <span class="b">dictview_len</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">)</span>
<a name="3816" /><a href="dictobject.c.html#3816"><span class="True">    3816:</span></a> <span class="f">{</span>
<a name="3817" /><a href="dictobject.c.html#3817"><span class="True">    3817:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">len</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="3818" /><a href="dictobject.c.html#3818"><span class="True">    3818:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3819" /><a href="dictobject.c.html#3819"><span class="True">    3819:</span></a>         <span class="b">len</span> <span class="f">=</span> <span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span><span class="f">-&gt;</span><span class="b">ma_used</span><span class="f">;</span>
<a name="3820" /><a href="dictobject.c.html#3820"><span class="True">    3820:</span></a>     <span class="m">return</span> <span class="b">len</span><span class="f">;</span>
<a name="3821" /><a href="dictobject.c.html#3821"><span class="True">    3821:</span></a> <span class="f">}</span>
<a name="3822" /><span class="True">    3822:</span> 
<a name="3823" /><a href="dictobject.c.html#3823"><span class="True">    3823:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3824" /><a href="dictobject.c.html#3824"><span class="True">    3824:</span></a> <span class="b">_PyDictView_New</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">,</span> <span class="b">PyTypeObject</span> <span class="f">*</span><span class="b">type</span><span class="f">)</span>
<a name="3825" /><a href="dictobject.c.html#3825"><span class="True">    3825:</span></a> <span class="f">{</span>
<a name="3826" /><a href="dictobject.c.html#3826"><span class="True">    3826:</span></a>     <span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">;</span>
<a name="3827" /><a href="dictobject.c.html#3827"><span class="True">    3827:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3828" /><a href="dictobject.c.html#3828"><span class="True">    3828:</span></a>         <a href="macros_ref.html#_UHlFcnJfQmFkSW50ZXJuYWxDYWxsXzA_"><span class="b">PyErr_BadInternalCall</span></a><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="3829" /><a href="dictobject.c.html#3829"><span class="True">    3829:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3830" /><a href="dictobject.c.html#3830"><span class="True">    3830:</span></a>     <span class="f">}</span>
<a name="3831" /><a href="dictobject.c.html#3831"><span class="True">    3831:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlEaWN0X0NoZWNrXzA_"><span class="b">PyDict_Check</span></a><span class="f">(</span><span class="b">dict</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="3832" /><span class="True">    3832:</span>         <span class="k">/* XXX Get rid of this restriction later */</span>
<a name="3833" /><a href="dictobject.c.html#3833"><span class="True">    3833:</span></a>         <span class="b">PyErr_Format</span><span class="f">(</span><span class="b">PyExc_TypeError</span><span class="f">,</span>
<a name="3834" /><a href="dictobject.c.html#3834"><span class="True">    3834:</span></a>                      <span class="e">&quot;%s() requires a dict argument, not &apos;%s&apos;&quot;</span><span class="f">,</span>
<a name="3835" /><a href="dictobject.c.html#3835"><span class="True">    3835:</span></a>                      <span class="b">type</span><span class="f">-&gt;</span><span class="b">tp_name</span><span class="f">,</span> <span class="b">dict</span><span class="f">-&gt;</span><span class="b">ob_type</span><span class="f">-&gt;</span><span class="b">tp_name</span><span class="f">)</span><span class="f">;</span>
<a name="3836" /><a href="dictobject.c.html#3836"><span class="True">    3836:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3837" /><a href="dictobject.c.html#3837"><span class="True">    3837:</span></a>     <span class="f">}</span>
<a name="3838" /><a href="dictobject.c.html#3838"><span class="True">    3838:</span></a>     <span class="b">dv</span> <span class="f">=</span> <a href="macros_ref.html#_UHlPYmplY3RfR0NfTmV3XzA_"><span class="b">PyObject_GC_New</span></a><span class="f">(</span><span class="b">_PyDictViewObject</span><span class="f">,</span> <span class="b">type</span><span class="f">)</span><span class="f">;</span>
<a name="3839" /><a href="dictobject.c.html#3839"><span class="True">    3839:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dv</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3840" /><a href="dictobject.c.html#3840"><span class="True">    3840:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3841" /><a href="dictobject.c.html#3841"><span class="True">    3841:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">dict</span><span class="f">)</span><span class="f">;</span>
<a name="3842" /><a href="dictobject.c.html#3842"><span class="True">    3842:</span></a>     <span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span> <span class="f">=</span> <span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dict</span><span class="f">;</span>
<a name="3843" /><a href="dictobject.c.html#3843"><span class="True">    3843:</span></a>     <a href="macros_ref.html#_X1B5T2JqZWN0X0dDX1RSQUNLXzA_"><span class="b">_PyObject_GC_TRACK</span></a><span class="f">(</span><span class="b">dv</span><span class="f">)</span><span class="f">;</span>
<a name="3844" /><a href="dictobject.c.html#3844"><span class="True">    3844:</span></a>     <span class="m">return</span> <span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dv</span><span class="f">;</span>
<a name="3845" /><a href="dictobject.c.html#3845"><span class="True">    3845:</span></a> <span class="f">}</span>
<a name="3846" /><span class="True">    3846:</span> 
<a name="3847" /><span class="True">    3847:</span> <span class="k">/* TODO(guido): The views objects are not complete:</span>
<a name="3848" /><span class="True">    3848:</span> <span class="k"></span>
<a name="3849" /><span class="True">    3849:</span> <span class="k"> * support more set operations</span>
<a name="3850" /><span class="True">    3850:</span> <span class="k"> * support arbitrary mappings?</span>
<a name="3851" /><span class="True">    3851:</span> <span class="k">   - either these should be static or exported in dictobject.h</span>
<a name="3852" /><span class="True">    3852:</span> <span class="k">   - if public then they should probably be in builtins</span>
<a name="3853" /><span class="True">    3853:</span> <span class="k">*/</span>
<a name="3854" /><span class="True">    3854:</span> 
<a name="3855" /><span class="True">    3855:</span> <span class="k">/* Return 1 if self is a subset of other, iterating over self;</span>
<a name="3856" /><span class="True">    3856:</span> <span class="k">   0 if not; -1 if an error occurred. */</span>
<a name="3857" /><a href="dictobject.c.html#3857"><span class="True">    3857:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="3858" /><a href="dictobject.c.html#3858"><span class="True">    3858:</span></a> <span class="b">all_contained_in</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">other</span><span class="f">)</span>
<a name="3859" /><a href="dictobject.c.html#3859"><span class="True">    3859:</span></a> <span class="f">{</span>
<a name="3860" /><a href="dictobject.c.html#3860"><span class="True">    3860:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">iter</span> <span class="f">=</span> <span class="b">PyObject_GetIter</span><span class="f">(</span><span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="3861" /><a href="dictobject.c.html#3861"><span class="True">    3861:</span></a>     <span class="m">int</span> <span class="b">ok</span> <span class="f">=</span> <span class="c">1</span><span class="f">;</span>
<a name="3862" /><span class="True">    3862:</span> 
<a name="3863" /><a href="dictobject.c.html#3863"><span class="True">    3863:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">iter</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3864" /><a href="dictobject.c.html#3864"><span class="True">    3864:</span></a>         <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="3865" /><a href="dictobject.c.html#3865"><span class="True">    3865:</span></a>     <span class="m">for</span> <span class="f">(</span><span class="f">;</span><span class="f">;</span><span class="f">)</span> <span class="f">{</span>
<a name="3866" /><a href="dictobject.c.html#3866"><span class="True">    3866:</span></a>         <span class="b">PyObject</span> <span class="f">*</span><span class="b">next</span> <span class="f">=</span> <span class="b">PyIter_Next</span><span class="f">(</span><span class="b">iter</span><span class="f">)</span><span class="f">;</span>
<a name="3867" /><a href="dictobject.c.html#3867"><span class="True">    3867:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">next</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3868" /><a href="dictobject.c.html#3868"><span class="True">    3868:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="3869" /><a href="dictobject.c.html#3869"><span class="True">    3869:</span></a>                 <span class="b">ok</span> <span class="f">=</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="3870" /><a href="dictobject.c.html#3870"><span class="True">    3870:</span></a>             <span class="m">break</span><span class="f">;</span>
<a name="3871" /><a href="dictobject.c.html#3871"><span class="True">    3871:</span></a>         <span class="f">}</span>
<a name="3872" /><a href="dictobject.c.html#3872"><span class="True">    3872:</span></a>         <span class="b">ok</span> <span class="f">=</span> <span class="b">PySequence_Contains</span><span class="f">(</span><span class="b">other</span><span class="f">,</span> <span class="b">next</span><span class="f">)</span><span class="f">;</span>
<a name="3873" /><a href="dictobject.c.html#3873"><span class="True">    3873:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">next</span><span class="f">)</span><span class="f">;</span>
<a name="3874" /><a href="dictobject.c.html#3874"><span class="True">    3874:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">ok</span> <span class="f">&lt;=</span> <span class="c">0</span><span class="f">)</span>
<a name="3875" /><a href="dictobject.c.html#3875"><span class="True">    3875:</span></a>             <span class="m">break</span><span class="f">;</span>
<a name="3876" /><a href="dictobject.c.html#3876"><span class="True">    3876:</span></a>     <span class="f">}</span>
<a name="3877" /><a href="dictobject.c.html#3877"><span class="True">    3877:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">iter</span><span class="f">)</span><span class="f">;</span>
<a name="3878" /><a href="dictobject.c.html#3878"><span class="True">    3878:</span></a>     <span class="m">return</span> <span class="b">ok</span><span class="f">;</span>
<a name="3879" /><a href="dictobject.c.html#3879"><span class="True">    3879:</span></a> <span class="f">}</span>
<a name="3880" /><span class="True">    3880:</span> 
<a name="3881" /><a href="dictobject.c.html#3881"><span class="True">    3881:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3882" /><a href="dictobject.c.html#3882"><span class="True">    3882:</span></a> <span class="b">dictview_richcompare</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">other</span><span class="f">,</span> <span class="m">int</span> <span class="b">op</span><span class="f">)</span>
<a name="3883" /><a href="dictobject.c.html#3883"><span class="True">    3883:</span></a> <span class="f">{</span>
<a name="3884" /><a href="dictobject.c.html#3884"><span class="True">    3884:</span></a>     <span class="b">Py_ssize_t</span> <span class="b">len_self</span><span class="f">,</span> <span class="b">len_other</span><span class="f">;</span>
<a name="3885" /><a href="dictobject.c.html#3885"><span class="True">    3885:</span></a>     <span class="m">int</span> <span class="b">ok</span><span class="f">;</span>
<a name="3886" /><a href="dictobject.c.html#3886"><span class="True">    3886:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">result</span><span class="f">;</span>
<a name="3887" /><span class="True">    3887:</span> 
<a name="3888" /><a href="dictobject.c.html#3888"><span class="True">    3888:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">self</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="3889" /><a href="dictobject.c.html#3889"><span class="True">    3889:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><a href="macros_ref.html#_UHlEaWN0Vmlld1NldF9DaGVja18w"><span class="b">PyDictViewSet_Check</span></a><span class="f">(</span><span class="b">self</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="3890" /><a href="dictobject.c.html#3890"><span class="True">    3890:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">other</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="3891" /><span class="True">    3891:</span> 
<a name="3892" /><a href="dictobject.c.html#3892"><span class="True">    3892:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlBbnlTZXRfQ2hlY2tfMA__"><span class="b">PyAnySet_Check</span></a><span class="f">(</span><span class="b">other</span><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="f">!</span><a href="macros_ref.html#_UHlEaWN0Vmlld1NldF9DaGVja18w"><span class="b">PyDictViewSet_Check</span></a><span class="f">(</span><span class="b">other</span><span class="f">)</span><span class="f">)</span>
<a name="3893" /><a href="dictobject.c.html#3893"><span class="True">    3893:</span></a>         <a href="macros_ref.html#_UHlfUkVUVVJOX05PVElNUExFTUVOVEVEXzA_"><span class="b">Py_RETURN_NOTIMPLEMENTED</span></a><span class="f">;</span>
<a name="3894" /><span class="True">    3894:</span> 
<a name="3895" /><a href="dictobject.c.html#3895"><span class="True">    3895:</span></a>     <span class="b">len_self</span> <span class="f">=</span> <span class="b">PyObject_Size</span><span class="f">(</span><span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="3896" /><a href="dictobject.c.html#3896"><span class="True">    3896:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">len_self</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="3897" /><a href="dictobject.c.html#3897"><span class="True">    3897:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3898" /><a href="dictobject.c.html#3898"><span class="True">    3898:</span></a>     <span class="b">len_other</span> <span class="f">=</span> <span class="b">PyObject_Size</span><span class="f">(</span><span class="b">other</span><span class="f">)</span><span class="f">;</span>
<a name="3899" /><a href="dictobject.c.html#3899"><span class="True">    3899:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">len_other</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="3900" /><a href="dictobject.c.html#3900"><span class="True">    3900:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3901" /><span class="True">    3901:</span> 
<a name="3902" /><a href="dictobject.c.html#3902"><span class="True">    3902:</span></a>     <span class="b">ok</span> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="3903" /><a href="dictobject.c.html#3903"><span class="True">    3903:</span></a>     <span class="m">switch</span><span class="f">(</span><span class="b">op</span><span class="f">)</span> <span class="f">{</span>
<a name="3904" /><span class="True">    3904:</span> 
<a name="3905" /><a href="dictobject.c.html#3905"><span class="True">    3905:</span></a>     <span class="m">case</span> <a href="macros_ref.html#_UHlfTkVfMA__"><span class="b">Py_NE</span></a><span class="f">:</span>
<a name="3906" /><a href="dictobject.c.html#3906"><span class="True">    3906:</span></a>     <span class="m">case</span> <a href="macros_ref.html#_UHlfRVFfMA__"><span class="b">Py_EQ</span></a><span class="f">:</span>
<a name="3907" /><a href="dictobject.c.html#3907"><span class="True">    3907:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">len_self</span> <span class="f">==</span> <span class="b">len_other</span><span class="f">)</span>
<a name="3908" /><a href="dictobject.c.html#3908"><span class="True">    3908:</span></a>             <span class="b">ok</span> <span class="f">=</span> <span class="b">all_contained_in</span><span class="f">(</span><span class="b">self</span><span class="f">,</span> <span class="b">other</span><span class="f">)</span><span class="f">;</span>
<a name="3909" /><a href="dictobject.c.html#3909"><span class="True">    3909:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">op</span> <span class="f">==</span> <a href="macros_ref.html#_UHlfTkVfMA__"><span class="b">Py_NE</span></a> <span class="f">&amp;&amp;</span> <span class="b">ok</span> <span class="f">&gt;=</span> <span class="c">0</span><span class="f">)</span>
<a name="3910" /><a href="dictobject.c.html#3910"><span class="True">    3910:</span></a>             <span class="b">ok</span> <span class="f">=</span> <span class="f">!</span><span class="b">ok</span><span class="f">;</span>
<a name="3911" /><a href="dictobject.c.html#3911"><span class="True">    3911:</span></a>         <span class="m">break</span><span class="f">;</span>
<a name="3912" /><span class="True">    3912:</span> 
<a name="3913" /><a href="dictobject.c.html#3913"><span class="True">    3913:</span></a>     <span class="m">case</span> <a href="macros_ref.html#_UHlfTFRfMA__"><span class="b">Py_LT</span></a><span class="f">:</span>
<a name="3914" /><a href="dictobject.c.html#3914"><span class="True">    3914:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">len_self</span> <span class="f">&lt;</span> <span class="b">len_other</span><span class="f">)</span>
<a name="3915" /><a href="dictobject.c.html#3915"><span class="True">    3915:</span></a>             <span class="b">ok</span> <span class="f">=</span> <span class="b">all_contained_in</span><span class="f">(</span><span class="b">self</span><span class="f">,</span> <span class="b">other</span><span class="f">)</span><span class="f">;</span>
<a name="3916" /><a href="dictobject.c.html#3916"><span class="True">    3916:</span></a>         <span class="m">break</span><span class="f">;</span>
<a name="3917" /><span class="True">    3917:</span> 
<a name="3918" /><a href="dictobject.c.html#3918"><span class="True">    3918:</span></a>       <span class="m">case</span> <a href="macros_ref.html#_UHlfTEVfMA__"><span class="b">Py_LE</span></a><span class="f">:</span>
<a name="3919" /><a href="dictobject.c.html#3919"><span class="True">    3919:</span></a>           <span class="m">if</span> <span class="f">(</span><span class="b">len_self</span> <span class="f">&lt;=</span> <span class="b">len_other</span><span class="f">)</span>
<a name="3920" /><a href="dictobject.c.html#3920"><span class="True">    3920:</span></a>               <span class="b">ok</span> <span class="f">=</span> <span class="b">all_contained_in</span><span class="f">(</span><span class="b">self</span><span class="f">,</span> <span class="b">other</span><span class="f">)</span><span class="f">;</span>
<a name="3921" /><a href="dictobject.c.html#3921"><span class="True">    3921:</span></a>           <span class="m">break</span><span class="f">;</span>
<a name="3922" /><span class="True">    3922:</span> 
<a name="3923" /><a href="dictobject.c.html#3923"><span class="True">    3923:</span></a>     <span class="m">case</span> <a href="macros_ref.html#_UHlfR1RfMA__"><span class="b">Py_GT</span></a><span class="f">:</span>
<a name="3924" /><a href="dictobject.c.html#3924"><span class="True">    3924:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">len_self</span> <span class="f">&gt;</span> <span class="b">len_other</span><span class="f">)</span>
<a name="3925" /><a href="dictobject.c.html#3925"><span class="True">    3925:</span></a>             <span class="b">ok</span> <span class="f">=</span> <span class="b">all_contained_in</span><span class="f">(</span><span class="b">other</span><span class="f">,</span> <span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="3926" /><a href="dictobject.c.html#3926"><span class="True">    3926:</span></a>         <span class="m">break</span><span class="f">;</span>
<a name="3927" /><span class="True">    3927:</span> 
<a name="3928" /><a href="dictobject.c.html#3928"><span class="True">    3928:</span></a>     <span class="m">case</span> <a href="macros_ref.html#_UHlfR0VfMA__"><span class="b">Py_GE</span></a><span class="f">:</span>
<a name="3929" /><a href="dictobject.c.html#3929"><span class="True">    3929:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">len_self</span> <span class="f">&gt;=</span> <span class="b">len_other</span><span class="f">)</span>
<a name="3930" /><a href="dictobject.c.html#3930"><span class="True">    3930:</span></a>             <span class="b">ok</span> <span class="f">=</span> <span class="b">all_contained_in</span><span class="f">(</span><span class="b">other</span><span class="f">,</span> <span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="3931" /><a href="dictobject.c.html#3931"><span class="True">    3931:</span></a>         <span class="m">break</span><span class="f">;</span>
<a name="3932" /><span class="True">    3932:</span> 
<a name="3933" /><a href="dictobject.c.html#3933"><span class="True">    3933:</span></a>     <span class="f">}</span>
<a name="3934" /><a href="dictobject.c.html#3934"><span class="True">    3934:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">ok</span> <span class="f">&lt;</span> <span class="c">0</span><span class="f">)</span>
<a name="3935" /><a href="dictobject.c.html#3935"><span class="True">    3935:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3936" /><a href="dictobject.c.html#3936"><span class="True">    3936:</span></a>     <span class="b">result</span> <span class="f">=</span> <span class="b">ok</span> <span class="f">?</span> <a href="macros_ref.html#_UHlfVHJ1ZV8w"><span class="b">Py_True</span></a> <span class="f">:</span> <a href="macros_ref.html#_UHlfRmFsc2VfMA__"><span class="b">Py_False</span></a><span class="f">;</span>
<a name="3937" /><a href="dictobject.c.html#3937"><span class="True">    3937:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">result</span><span class="f">)</span><span class="f">;</span>
<a name="3938" /><a href="dictobject.c.html#3938"><span class="True">    3938:</span></a>     <span class="m">return</span> <span class="b">result</span><span class="f">;</span>
<a name="3939" /><a href="dictobject.c.html#3939"><span class="True">    3939:</span></a> <span class="f">}</span>
<a name="3940" /><span class="True">    3940:</span> 
<a name="3941" /><a href="dictobject.c.html#3941"><span class="True">    3941:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3942" /><a href="dictobject.c.html#3942"><span class="True">    3942:</span></a> <span class="b">dictview_repr</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">)</span>
<a name="3943" /><a href="dictobject.c.html#3943"><span class="True">    3943:</span></a> <span class="f">{</span>
<a name="3944" /><a href="dictobject.c.html#3944"><span class="True">    3944:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">seq</span><span class="f">;</span>
<a name="3945" /><a href="dictobject.c.html#3945"><span class="True">    3945:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">result</span><span class="f">;</span>
<a name="3946" /><span class="True">    3946:</span> 
<a name="3947" /><a href="dictobject.c.html#3947"><span class="True">    3947:</span></a>     <span class="b">seq</span> <span class="f">=</span> <span class="b">PySequence_List</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dv</span><span class="f">)</span><span class="f">;</span>
<a name="3948" /><a href="dictobject.c.html#3948"><span class="True">    3948:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">seq</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3949" /><a href="dictobject.c.html#3949"><span class="True">    3949:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3950" /><span class="True">    3950:</span> 
<a name="3951" /><a href="dictobject.c.html#3951"><span class="True">    3951:</span></a>     <span class="b">result</span> <span class="f">=</span> <span class="b">PyUnicode_FromFormat</span><span class="f">(</span><span class="e">&quot;%s(%R)&quot;</span><span class="f">,</span> <a href="macros_ref.html#_UHlfVFlQRV8w"><span class="b">Py_TYPE</span></a><span class="f">(</span><span class="b">dv</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">tp_name</span><span class="f">,</span> <span class="b">seq</span><span class="f">)</span><span class="f">;</span>
<a name="3952" /><a href="dictobject.c.html#3952"><span class="True">    3952:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">seq</span><span class="f">)</span><span class="f">;</span>
<a name="3953" /><a href="dictobject.c.html#3953"><span class="True">    3953:</span></a>     <span class="m">return</span> <span class="b">result</span><span class="f">;</span>
<a name="3954" /><a href="dictobject.c.html#3954"><span class="True">    3954:</span></a> <span class="f">}</span>
<a name="3955" /><span class="True">    3955:</span> 
<a name="3956" /><span class="True">    3956:</span> <span class="k">/*** dict_keys ***/</span>
<a name="3957" /><span class="True">    3957:</span> 
<a name="3958" /><a href="dictobject.c.html#3958"><span class="True">    3958:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="3959" /><a href="dictobject.c.html#3959"><span class="True">    3959:</span></a> <span class="b">dictkeys_iter</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">)</span>
<a name="3960" /><a href="dictobject.c.html#3960"><span class="True">    3960:</span></a> <span class="f">{</span>
<a name="3961" /><a href="dictobject.c.html#3961"><span class="True">    3961:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3962" /><a href="dictobject.c.html#3962"><span class="True">    3962:</span></a>         <a href="macros_ref.html#_UHlfUkVUVVJOX05PTkVfMA__"><span class="b">Py_RETURN_NONE</span></a><span class="f">;</span>
<a name="3963" /><a href="dictobject.c.html#3963"><span class="True">    3963:</span></a>     <span class="f">}</span>
<a name="3964" /><a href="dictobject.c.html#3964"><span class="True">    3964:</span></a>     <span class="m">return</span> <span class="b">dictiter_new</span><span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyDictIterKey_Type</span><span class="f">)</span><span class="f">;</span>
<a name="3965" /><a href="dictobject.c.html#3965"><span class="True">    3965:</span></a> <span class="f">}</span>
<a name="3966" /><span class="True">    3966:</span> 
<a name="3967" /><a href="dictobject.c.html#3967"><span class="True">    3967:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="3968" /><a href="dictobject.c.html#3968"><span class="True">    3968:</span></a> <span class="b">dictkeys_contains</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">obj</span><span class="f">)</span>
<a name="3969" /><a href="dictobject.c.html#3969"><span class="True">    3969:</span></a> <span class="f">{</span>
<a name="3970" /><a href="dictobject.c.html#3970"><span class="True">    3970:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3971" /><a href="dictobject.c.html#3971"><span class="True">    3971:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="3972" /><a href="dictobject.c.html#3972"><span class="True">    3972:</span></a>     <span class="m">return</span> <span class="b">PyDict_Contains</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span><span class="f">,</span> <span class="b">obj</span><span class="f">)</span><span class="f">;</span>
<a name="3973" /><a href="dictobject.c.html#3973"><span class="True">    3973:</span></a> <span class="f">}</span>
<a name="3974" /><span class="True">    3974:</span> 
<a name="3975" /><a href="dictobject.c.html#3975"><span class="True">    3975:</span></a> <span class="m">static</span> <span class="b">PySequenceMethods</span> <span class="b">dictkeys_as_sequence</span> <span class="f">=</span> <span class="f">{</span>
<a name="3976" /><a href="dictobject.c.html#3976"><span class="True">    3976:</span></a>     <span class="f">(</span><span class="b">lenfunc</span><span class="f">)</span><span class="b">dictview_len</span><span class="f">,</span>              <span class="k">/* sq_length */</span>
<a name="3977" /><a href="dictobject.c.html#3977"><span class="True">    3977:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_concat */</span>
<a name="3978" /><a href="dictobject.c.html#3978"><span class="True">    3978:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_repeat */</span>
<a name="3979" /><a href="dictobject.c.html#3979"><span class="True">    3979:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_item */</span>
<a name="3980" /><a href="dictobject.c.html#3980"><span class="True">    3980:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_slice */</span>
<a name="3981" /><a href="dictobject.c.html#3981"><span class="True">    3981:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_ass_item */</span>
<a name="3982" /><a href="dictobject.c.html#3982"><span class="True">    3982:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_ass_slice */</span>
<a name="3983" /><a href="dictobject.c.html#3983"><span class="True">    3983:</span></a>     <span class="f">(</span><span class="b">objobjproc</span><span class="f">)</span><span class="b">dictkeys_contains</span><span class="f">,</span>      <span class="k">/* sq_contains */</span>
<a name="3984" /><a href="dictobject.c.html#3984"><span class="True">    3984:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="3985" /><span class="True">    3985:</span> 
<a name="3986" /><a href="dictobject.c.html#3986"><span class="True">    3986:</span></a> <span class="m">static</span> <span class="b">PyObject</span><span class="f">*</span>
<a name="3987" /><a href="dictobject.c.html#3987"><span class="True">    3987:</span></a> <span class="b">dictviews_sub</span><span class="f">(</span><span class="b">PyObject</span><span class="f">*</span> <span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">other</span><span class="f">)</span>
<a name="3988" /><a href="dictobject.c.html#3988"><span class="True">    3988:</span></a> <span class="f">{</span>
<a name="3989" /><a href="dictobject.c.html#3989"><span class="True">    3989:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">result</span> <span class="f">=</span> <span class="b">PySet_New</span><span class="f">(</span><span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="3990" /><a href="dictobject.c.html#3990"><span class="True">    3990:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">tmp</span><span class="f">;</span>
<a name="3991" /><a href="dictobject.c.html#3991"><span class="True">    3991:</span></a>     <a href="macros_ref.html#_X1B5X0lERU5USUZJRVJfMA__"><span class="b">_Py_IDENTIFIER</span></a><span class="f">(</span><span class="b">difference_update</span><span class="f">)</span><span class="f">;</span>
<a name="3992" /><span class="True">    3992:</span> 
<a name="3993" /><a href="dictobject.c.html#3993"><span class="True">    3993:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">result</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="3994" /><a href="dictobject.c.html#3994"><span class="True">    3994:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="3995" /><span class="True">    3995:</span> 
<a name="3996" /><a href="dictobject.c.html#3996"><span class="True">    3996:</span></a>     <span class="b">tmp</span> <span class="f">=</span> <span class="b">_PyObject_CallMethodIdObjArgs</span><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyId_difference_update</span><span class="f">,</span> <span class="b">other</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="3997" /><a href="dictobject.c.html#3997"><span class="True">    3997:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">tmp</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="3998" /><a href="dictobject.c.html#3998"><span class="True">    3998:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">result</span><span class="f">)</span><span class="f">;</span>
<a name="3999" /><a href="dictobject.c.html#3999"><span class="True">    3999:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4000" /><a href="dictobject.c.html#4000"><span class="True">    4000:</span></a>     <span class="f">}</span>
<a name="4001" /><span class="True">    4001:</span> 
<a name="4002" /><a href="dictobject.c.html#4002"><span class="True">    4002:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">tmp</span><span class="f">)</span><span class="f">;</span>
<a name="4003" /><a href="dictobject.c.html#4003"><span class="True">    4003:</span></a>     <span class="m">return</span> <span class="b">result</span><span class="f">;</span>
<a name="4004" /><a href="dictobject.c.html#4004"><span class="True">    4004:</span></a> <span class="f">}</span>
<a name="4005" /><span class="True">    4005:</span> 
<a name="4006" /><a href="dictobject.c.html#4006"><span class="True">    4006:</span></a> <span class="b">PyObject</span><span class="f">*</span>
<a name="4007" /><a href="dictobject.c.html#4007"><span class="True">    4007:</span></a> <span class="b">_PyDictView_Intersect</span><span class="f">(</span><span class="b">PyObject</span><span class="f">*</span> <span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">other</span><span class="f">)</span>
<a name="4008" /><a href="dictobject.c.html#4008"><span class="True">    4008:</span></a> <span class="f">{</span>
<a name="4009" /><a href="dictobject.c.html#4009"><span class="True">    4009:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">result</span> <span class="f">=</span> <span class="b">PySet_New</span><span class="f">(</span><span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="4010" /><a href="dictobject.c.html#4010"><span class="True">    4010:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">tmp</span><span class="f">;</span>
<a name="4011" /><a href="dictobject.c.html#4011"><span class="True">    4011:</span></a>     <a href="macros_ref.html#_X1B5X0lERU5USUZJRVJfMA__"><span class="b">_Py_IDENTIFIER</span></a><span class="f">(</span><span class="b">intersection_update</span><span class="f">)</span><span class="f">;</span>
<a name="4012" /><span class="True">    4012:</span> 
<a name="4013" /><a href="dictobject.c.html#4013"><span class="True">    4013:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">result</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="4014" /><a href="dictobject.c.html#4014"><span class="True">    4014:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4015" /><span class="True">    4015:</span> 
<a name="4016" /><a href="dictobject.c.html#4016"><span class="True">    4016:</span></a>     <span class="b">tmp</span> <span class="f">=</span> <span class="b">_PyObject_CallMethodIdObjArgs</span><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyId_intersection_update</span><span class="f">,</span> <span class="b">other</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="4017" /><a href="dictobject.c.html#4017"><span class="True">    4017:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">tmp</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4018" /><a href="dictobject.c.html#4018"><span class="True">    4018:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">result</span><span class="f">)</span><span class="f">;</span>
<a name="4019" /><a href="dictobject.c.html#4019"><span class="True">    4019:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4020" /><a href="dictobject.c.html#4020"><span class="True">    4020:</span></a>     <span class="f">}</span>
<a name="4021" /><span class="True">    4021:</span> 
<a name="4022" /><a href="dictobject.c.html#4022"><span class="True">    4022:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">tmp</span><span class="f">)</span><span class="f">;</span>
<a name="4023" /><a href="dictobject.c.html#4023"><span class="True">    4023:</span></a>     <span class="m">return</span> <span class="b">result</span><span class="f">;</span>
<a name="4024" /><a href="dictobject.c.html#4024"><span class="True">    4024:</span></a> <span class="f">}</span>
<a name="4025" /><span class="True">    4025:</span> 
<a name="4026" /><a href="dictobject.c.html#4026"><span class="True">    4026:</span></a> <span class="m">static</span> <span class="b">PyObject</span><span class="f">*</span>
<a name="4027" /><a href="dictobject.c.html#4027"><span class="True">    4027:</span></a> <span class="b">dictviews_or</span><span class="f">(</span><span class="b">PyObject</span><span class="f">*</span> <span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">other</span><span class="f">)</span>
<a name="4028" /><a href="dictobject.c.html#4028"><span class="True">    4028:</span></a> <span class="f">{</span>
<a name="4029" /><a href="dictobject.c.html#4029"><span class="True">    4029:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">result</span> <span class="f">=</span> <span class="b">PySet_New</span><span class="f">(</span><span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="4030" /><a href="dictobject.c.html#4030"><span class="True">    4030:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">tmp</span><span class="f">;</span>
<a name="4031" /><a href="dictobject.c.html#4031"><span class="True">    4031:</span></a>     <a href="macros_ref.html#_X1B5X0lERU5USUZJRVJfMA__"><span class="b">_Py_IDENTIFIER</span></a><span class="f">(</span><span class="b">update</span><span class="f">)</span><span class="f">;</span>
<a name="4032" /><span class="True">    4032:</span> 
<a name="4033" /><a href="dictobject.c.html#4033"><span class="True">    4033:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">result</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="4034" /><a href="dictobject.c.html#4034"><span class="True">    4034:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4035" /><span class="True">    4035:</span> 
<a name="4036" /><a href="dictobject.c.html#4036"><span class="True">    4036:</span></a>     <span class="b">tmp</span> <span class="f">=</span> <span class="b">_PyObject_CallMethodIdObjArgs</span><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyId_update</span><span class="f">,</span> <span class="b">other</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="4037" /><a href="dictobject.c.html#4037"><span class="True">    4037:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">tmp</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4038" /><a href="dictobject.c.html#4038"><span class="True">    4038:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">result</span><span class="f">)</span><span class="f">;</span>
<a name="4039" /><a href="dictobject.c.html#4039"><span class="True">    4039:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4040" /><a href="dictobject.c.html#4040"><span class="True">    4040:</span></a>     <span class="f">}</span>
<a name="4041" /><span class="True">    4041:</span> 
<a name="4042" /><a href="dictobject.c.html#4042"><span class="True">    4042:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">tmp</span><span class="f">)</span><span class="f">;</span>
<a name="4043" /><a href="dictobject.c.html#4043"><span class="True">    4043:</span></a>     <span class="m">return</span> <span class="b">result</span><span class="f">;</span>
<a name="4044" /><a href="dictobject.c.html#4044"><span class="True">    4044:</span></a> <span class="f">}</span>
<a name="4045" /><span class="True">    4045:</span> 
<a name="4046" /><a href="dictobject.c.html#4046"><span class="True">    4046:</span></a> <span class="m">static</span> <span class="b">PyObject</span><span class="f">*</span>
<a name="4047" /><a href="dictobject.c.html#4047"><span class="True">    4047:</span></a> <span class="b">dictviews_xor</span><span class="f">(</span><span class="b">PyObject</span><span class="f">*</span> <span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">other</span><span class="f">)</span>
<a name="4048" /><a href="dictobject.c.html#4048"><span class="True">    4048:</span></a> <span class="f">{</span>
<a name="4049" /><a href="dictobject.c.html#4049"><span class="True">    4049:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">result</span> <span class="f">=</span> <span class="b">PySet_New</span><span class="f">(</span><span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="4050" /><a href="dictobject.c.html#4050"><span class="True">    4050:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">tmp</span><span class="f">;</span>
<a name="4051" /><a href="dictobject.c.html#4051"><span class="True">    4051:</span></a>     <a href="macros_ref.html#_X1B5X0lERU5USUZJRVJfMA__"><span class="b">_Py_IDENTIFIER</span></a><span class="f">(</span><span class="b">symmetric_difference_update</span><span class="f">)</span><span class="f">;</span>
<a name="4052" /><span class="True">    4052:</span> 
<a name="4053" /><a href="dictobject.c.html#4053"><span class="True">    4053:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">result</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="4054" /><a href="dictobject.c.html#4054"><span class="True">    4054:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4055" /><span class="True">    4055:</span> 
<a name="4056" /><a href="dictobject.c.html#4056"><span class="True">    4056:</span></a>     <span class="b">tmp</span> <span class="f">=</span> <span class="b">_PyObject_CallMethodIdObjArgs</span><span class="f">(</span><span class="b">result</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyId_symmetric_difference_update</span><span class="f">,</span> <span class="b">other</span><span class="f">,</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="4057" /><a href="dictobject.c.html#4057"><span class="True">    4057:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">tmp</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4058" /><a href="dictobject.c.html#4058"><span class="True">    4058:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">result</span><span class="f">)</span><span class="f">;</span>
<a name="4059" /><a href="dictobject.c.html#4059"><span class="True">    4059:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4060" /><a href="dictobject.c.html#4060"><span class="True">    4060:</span></a>     <span class="f">}</span>
<a name="4061" /><span class="True">    4061:</span> 
<a name="4062" /><a href="dictobject.c.html#4062"><span class="True">    4062:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">tmp</span><span class="f">)</span><span class="f">;</span>
<a name="4063" /><a href="dictobject.c.html#4063"><span class="True">    4063:</span></a>     <span class="m">return</span> <span class="b">result</span><span class="f">;</span>
<a name="4064" /><a href="dictobject.c.html#4064"><span class="True">    4064:</span></a> <span class="f">}</span>
<a name="4065" /><span class="True">    4065:</span> 
<a name="4066" /><a href="dictobject.c.html#4066"><span class="True">    4066:</span></a> <span class="m">static</span> <span class="b">PyNumberMethods</span> <span class="b">dictviews_as_number</span> <span class="f">=</span> <span class="f">{</span>
<a name="4067" /><a href="dictobject.c.html#4067"><span class="True">    4067:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_add*/</span>
<a name="4068" /><a href="dictobject.c.html#4068"><span class="True">    4068:</span></a>     <span class="f">(</span><span class="b">binaryfunc</span><span class="f">)</span><span class="b">dictviews_sub</span><span class="f">,</span>          <span class="k">/*nb_subtract*/</span>
<a name="4069" /><a href="dictobject.c.html#4069"><span class="True">    4069:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_multiply*/</span>
<a name="4070" /><a href="dictobject.c.html#4070"><span class="True">    4070:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_remainder*/</span>
<a name="4071" /><a href="dictobject.c.html#4071"><span class="True">    4071:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_divmod*/</span>
<a name="4072" /><a href="dictobject.c.html#4072"><span class="True">    4072:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_power*/</span>
<a name="4073" /><a href="dictobject.c.html#4073"><span class="True">    4073:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_negative*/</span>
<a name="4074" /><a href="dictobject.c.html#4074"><span class="True">    4074:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_positive*/</span>
<a name="4075" /><a href="dictobject.c.html#4075"><span class="True">    4075:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_absolute*/</span>
<a name="4076" /><a href="dictobject.c.html#4076"><span class="True">    4076:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_bool*/</span>
<a name="4077" /><a href="dictobject.c.html#4077"><span class="True">    4077:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_invert*/</span>
<a name="4078" /><a href="dictobject.c.html#4078"><span class="True">    4078:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_lshift*/</span>
<a name="4079" /><a href="dictobject.c.html#4079"><span class="True">    4079:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/*nb_rshift*/</span>
<a name="4080" /><a href="dictobject.c.html#4080"><span class="True">    4080:</span></a>     <span class="f">(</span><span class="b">binaryfunc</span><span class="f">)</span><span class="b">_PyDictView_Intersect</span><span class="f">,</span>  <span class="k">/*nb_and*/</span>
<a name="4081" /><a href="dictobject.c.html#4081"><span class="True">    4081:</span></a>     <span class="f">(</span><span class="b">binaryfunc</span><span class="f">)</span><span class="b">dictviews_xor</span><span class="f">,</span>          <span class="k">/*nb_xor*/</span>
<a name="4082" /><a href="dictobject.c.html#4082"><span class="True">    4082:</span></a>     <span class="f">(</span><span class="b">binaryfunc</span><span class="f">)</span><span class="b">dictviews_or</span><span class="f">,</span>           <span class="k">/*nb_or*/</span>
<a name="4083" /><a href="dictobject.c.html#4083"><span class="True">    4083:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="4084" /><span class="True">    4084:</span> 
<a name="4085" /><a href="dictobject.c.html#4085"><span class="True">    4085:</span></a> <span class="m">static</span> <span class="b">PyObject</span><span class="f">*</span>
<a name="4086" /><a href="dictobject.c.html#4086"><span class="True">    4086:</span></a> <span class="b">dictviews_isdisjoint</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">self</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">other</span><span class="f">)</span>
<a name="4087" /><a href="dictobject.c.html#4087"><span class="True">    4087:</span></a> <span class="f">{</span>
<a name="4088" /><a href="dictobject.c.html#4088"><span class="True">    4088:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">it</span><span class="f">;</span>
<a name="4089" /><a href="dictobject.c.html#4089"><span class="True">    4089:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">item</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4090" /><span class="True">    4090:</span> 
<a name="4091" /><a href="dictobject.c.html#4091"><span class="True">    4091:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">self</span> <span class="f">==</span> <span class="b">other</span><span class="f">)</span> <span class="f">{</span>
<a name="4092" /><a href="dictobject.c.html#4092"><span class="True">    4092:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">dictview_len</span><span class="f">(</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="f">)</span><span class="b">self</span><span class="f">)</span> <span class="f">==</span> <span class="c">0</span><span class="f">)</span>
<a name="4093" /><a href="dictobject.c.html#4093"><span class="True">    4093:</span></a>             <a href="macros_ref.html#_UHlfUkVUVVJOX1RSVUVfMA__"><span class="b">Py_RETURN_TRUE</span></a><span class="f">;</span>
<a name="4094" /><a href="dictobject.c.html#4094"><span class="True">    4094:</span></a>         <span class="m">else</span>
<a name="4095" /><a href="dictobject.c.html#4095"><span class="True">    4095:</span></a>             <a href="macros_ref.html#_UHlfUkVUVVJOX0ZBTFNFXzA_"><span class="b">Py_RETURN_FALSE</span></a><span class="f">;</span>
<a name="4096" /><a href="dictobject.c.html#4096"><span class="True">    4096:</span></a>     <span class="f">}</span>
<a name="4097" /><span class="True">    4097:</span> 
<a name="4098" /><span class="True">    4098:</span>     <span class="k">/* Iterate over the shorter object (only if other is a set,</span>
<a name="4099" /><span class="True">    4099:</span> <span class="k">     * because PySequence_Contains may be expensive otherwise): */</span>
<a name="4100" /><a href="dictobject.c.html#4100"><span class="True">    4100:</span></a>     <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_UHlBbnlTZXRfQ2hlY2tfMA__"><span class="b">PyAnySet_Check</span></a><span class="f">(</span><span class="b">other</span><span class="f">)</span> <span class="f">||</span> <a href="macros_ref.html#_UHlEaWN0Vmlld1NldF9DaGVja18w"><span class="b">PyDictViewSet_Check</span></a><span class="f">(</span><span class="b">other</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="4101" /><a href="dictobject.c.html#4101"><span class="True">    4101:</span></a>         <span class="b">Py_ssize_t</span> <span class="b">len_self</span> <span class="f">=</span> <span class="b">dictview_len</span><span class="f">(</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="f">)</span><span class="b">self</span><span class="f">)</span><span class="f">;</span>
<a name="4102" /><a href="dictobject.c.html#4102"><span class="True">    4102:</span></a>         <span class="b">Py_ssize_t</span> <span class="b">len_other</span> <span class="f">=</span> <span class="b">PyObject_Size</span><span class="f">(</span><span class="b">other</span><span class="f">)</span><span class="f">;</span>
<a name="4103" /><a href="dictobject.c.html#4103"><span class="True">    4103:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">len_other</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span>
<a name="4104" /><a href="dictobject.c.html#4104"><span class="True">    4104:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4105" /><span class="True">    4105:</span> 
<a name="4106" /><a href="dictobject.c.html#4106"><span class="True">    4106:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="b">len_other</span> <span class="f">&gt;</span> <span class="b">len_self</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="4107" /><a href="dictobject.c.html#4107"><span class="True">    4107:</span></a>             <span class="b">PyObject</span> <span class="f">*</span><span class="b">tmp</span> <span class="f">=</span> <span class="b">other</span><span class="f">;</span>
<a name="4108" /><a href="dictobject.c.html#4108"><span class="True">    4108:</span></a>             <span class="b">other</span> <span class="f">=</span> <span class="b">self</span><span class="f">;</span>
<a name="4109" /><a href="dictobject.c.html#4109"><span class="True">    4109:</span></a>             <span class="b">self</span> <span class="f">=</span> <span class="b">tmp</span><span class="f">;</span>
<a name="4110" /><a href="dictobject.c.html#4110"><span class="True">    4110:</span></a>         <span class="f">}</span>
<a name="4111" /><a href="dictobject.c.html#4111"><span class="True">    4111:</span></a>     <span class="f">}</span>
<a name="4112" /><span class="True">    4112:</span> 
<a name="4113" /><a href="dictobject.c.html#4113"><span class="True">    4113:</span></a>     <span class="b">it</span> <span class="f">=</span> <span class="b">PyObject_GetIter</span><span class="f">(</span><span class="b">other</span><span class="f">)</span><span class="f">;</span>
<a name="4114" /><a href="dictobject.c.html#4114"><span class="True">    4114:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">it</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="4115" /><a href="dictobject.c.html#4115"><span class="True">    4115:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4116" /><span class="True">    4116:</span> 
<a name="4117" /><a href="dictobject.c.html#4117"><span class="True">    4117:</span></a>     <span class="m">while</span> <span class="f">(</span><span class="f">(</span><span class="b">item</span> <span class="f">=</span> <span class="b">PyIter_Next</span><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">)</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4118" /><a href="dictobject.c.html#4118"><span class="True">    4118:</span></a>         <span class="m">int</span> <span class="b">contains</span> <span class="f">=</span> <span class="b">PySequence_Contains</span><span class="f">(</span><span class="b">self</span><span class="f">,</span> <span class="b">item</span><span class="f">)</span><span class="f">;</span>
<a name="4119" /><a href="dictobject.c.html#4119"><span class="True">    4119:</span></a>         <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">item</span><span class="f">)</span><span class="f">;</span>
<a name="4120" /><a href="dictobject.c.html#4120"><span class="True">    4120:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">contains</span> <span class="f">==</span> <span class="f">-</span><span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="4121" /><a href="dictobject.c.html#4121"><span class="True">    4121:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">;</span>
<a name="4122" /><a href="dictobject.c.html#4122"><span class="True">    4122:</span></a>             <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4123" /><a href="dictobject.c.html#4123"><span class="True">    4123:</span></a>         <span class="f">}</span>
<a name="4124" /><span class="True">    4124:</span> 
<a name="4125" /><a href="dictobject.c.html#4125"><span class="True">    4125:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">contains</span><span class="f">)</span> <span class="f">{</span>
<a name="4126" /><a href="dictobject.c.html#4126"><span class="True">    4126:</span></a>             <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">;</span>
<a name="4127" /><a href="dictobject.c.html#4127"><span class="True">    4127:</span></a>             <a href="macros_ref.html#_UHlfUkVUVVJOX0ZBTFNFXzA_"><span class="b">Py_RETURN_FALSE</span></a><span class="f">;</span>
<a name="4128" /><a href="dictobject.c.html#4128"><span class="True">    4128:</span></a>         <span class="f">}</span>
<a name="4129" /><a href="dictobject.c.html#4129"><span class="True">    4129:</span></a>     <span class="f">}</span>
<a name="4130" /><a href="dictobject.c.html#4130"><span class="True">    4130:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">it</span><span class="f">)</span><span class="f">;</span>
<a name="4131" /><a href="dictobject.c.html#4131"><span class="True">    4131:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="4132" /><a href="dictobject.c.html#4132"><span class="True">    4132:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span> <span class="k">/* PyIter_Next raised an exception. */</span>
<a name="4133" /><a href="dictobject.c.html#4133"><span class="True">    4133:</span></a>     <a href="macros_ref.html#_UHlfUkVUVVJOX1RSVUVfMA__"><span class="b">Py_RETURN_TRUE</span></a><span class="f">;</span>
<a name="4134" /><a href="dictobject.c.html#4134"><span class="True">    4134:</span></a> <span class="f">}</span>
<a name="4135" /><span class="True">    4135:</span> 
<a name="4136" /><span class="True">    4136:</span> <a href="macros_ref.html#_UHlEb2NfU1RSVkFSXzA_"><span class="b">PyDoc_STRVAR</span></a><span class="f">(</span><span class="b">isdisjoint_doc</span><span class="f">,</span>
<a name="4137" /><a href="dictobject.c.html#4137"><span class="True">    4137:</span></a> <span class="e">&quot;Return True if the view and the given iterable have a null intersection.&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="4138" /><span class="True">    4138:</span> 
<a name="4139" /><a href="dictobject.c.html#4139"><span class="True">    4139:</span></a> <span class="m">static</span> <span class="b">PyMethodDef</span> <span class="b">dictkeys_methods</span><span class="f">[</span><span class="f">]</span> <span class="f">=</span> <span class="f">{</span>
<a name="4140" /><a href="dictobject.c.html#4140"><span class="True">    4140:</span></a>     <span class="f">{</span><span class="e">&quot;isdisjoint&quot;</span><span class="f">,</span>      <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dictviews_isdisjoint</span><span class="f">,</span>  <a href="macros_ref.html#_TUVUSF9PXzA_"><span class="b">METH_O</span></a><span class="f">,</span>
<a name="4141" /><a href="dictobject.c.html#4141"><span class="True">    4141:</span></a>      <span class="b">isdisjoint_doc</span><span class="f">}</span><span class="f">,</span>
<a name="4142" /><a href="dictobject.c.html#4142"><span class="True">    4142:</span></a>     <span class="f">{</span><a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span>              <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">}</span>           <span class="k">/* sentinel */</span>
<a name="4143" /><a href="dictobject.c.html#4143"><span class="True">    4143:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="4144" /><span class="True">    4144:</span> 
<a name="4145" /><a href="dictobject.c.html#4145"><span class="True">    4145:</span></a> <span class="b">PyTypeObject</span> <span class="b">PyDictKeys_Type</span> <span class="f">=</span> <span class="f">{</span>
<a name="4146" /><a href="dictobject.c.html#4146"><span class="True">    4146:</span></a>     <a href="macros_ref.html#_UHlWYXJPYmplY3RfSEVBRF9JTklUXzA_"><span class="b">PyVarObject_HEAD_INIT</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">PyType_Type</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="4147" /><a href="dictobject.c.html#4147"><span class="True">    4147:</span></a>     <span class="e">&quot;dict_keys&quot;</span><span class="f">,</span>                                <span class="k">/* tp_name */</span>
<a name="4148" /><a href="dictobject.c.html#4148"><span class="True">    4148:</span></a>     <span class="m">sizeof</span><span class="f">(</span><span class="b">_PyDictViewObject</span><span class="f">)</span><span class="f">,</span>                  <span class="k">/* tp_basicsize */</span>
<a name="4149" /><a href="dictobject.c.html#4149"><span class="True">    4149:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_itemsize */</span>
<a name="4150" /><span class="True">    4150:</span>     <span class="k">/* methods */</span>
<a name="4151" /><a href="dictobject.c.html#4151"><span class="True">    4151:</span></a>     <span class="f">(</span><span class="b">destructor</span><span class="f">)</span><span class="b">dictview_dealloc</span><span class="f">,</span>               <span class="k">/* tp_dealloc */</span>
<a name="4152" /><a href="dictobject.c.html#4152"><span class="True">    4152:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_print */</span>
<a name="4153" /><a href="dictobject.c.html#4153"><span class="True">    4153:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_getattr */</span>
<a name="4154" /><a href="dictobject.c.html#4154"><span class="True">    4154:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattr */</span>
<a name="4155" /><a href="dictobject.c.html#4155"><span class="True">    4155:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_reserved */</span>
<a name="4156" /><a href="dictobject.c.html#4156"><span class="True">    4156:</span></a>     <span class="f">(</span><span class="b">reprfunc</span><span class="f">)</span><span class="b">dictview_repr</span><span class="f">,</span>                    <span class="k">/* tp_repr */</span>
<a name="4157" /><a href="dictobject.c.html#4157"><span class="True">    4157:</span></a>     <span class="f">&amp;</span><span class="b">dictviews_as_number</span><span class="f">,</span>                       <span class="k">/* tp_as_number */</span>
<a name="4158" /><a href="dictobject.c.html#4158"><span class="True">    4158:</span></a>     <span class="f">&amp;</span><span class="b">dictkeys_as_sequence</span><span class="f">,</span>                      <span class="k">/* tp_as_sequence */</span>
<a name="4159" /><a href="dictobject.c.html#4159"><span class="True">    4159:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_mapping */</span>
<a name="4160" /><a href="dictobject.c.html#4160"><span class="True">    4160:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_hash */</span>
<a name="4161" /><a href="dictobject.c.html#4161"><span class="True">    4161:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_call */</span>
<a name="4162" /><a href="dictobject.c.html#4162"><span class="True">    4162:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_str */</span>
<a name="4163" /><a href="dictobject.c.html#4163"><span class="True">    4163:</span></a>     <span class="b">PyObject_GenericGetAttr</span><span class="f">,</span>                    <span class="k">/* tp_getattro */</span>
<a name="4164" /><a href="dictobject.c.html#4164"><span class="True">    4164:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattro */</span>
<a name="4165" /><a href="dictobject.c.html#4165"><span class="True">    4165:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_buffer */</span>
<a name="4166" /><a href="dictobject.c.html#4166"><span class="True">    4166:</span></a>     <a href="macros_ref.html#_UHlfVFBGTEFHU19ERUZBVUxUXzA_"><span class="b">Py_TPFLAGS_DEFAULT</span></a> <span class="f">|</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19IQVZFX0dDXzA_"><span class="b">Py_TPFLAGS_HAVE_GC</span></a><span class="f">,</span><span class="k">/* tp_flags */</span>
<a name="4167" /><a href="dictobject.c.html#4167"><span class="True">    4167:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_doc */</span>
<a name="4168" /><a href="dictobject.c.html#4168"><span class="True">    4168:</span></a>     <span class="f">(</span><span class="b">traverseproc</span><span class="f">)</span><span class="b">dictview_traverse</span><span class="f">,</span>            <span class="k">/* tp_traverse */</span>
<a name="4169" /><a href="dictobject.c.html#4169"><span class="True">    4169:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_clear */</span>
<a name="4170" /><a href="dictobject.c.html#4170"><span class="True">    4170:</span></a>     <span class="b">dictview_richcompare</span><span class="f">,</span>                       <span class="k">/* tp_richcompare */</span>
<a name="4171" /><a href="dictobject.c.html#4171"><span class="True">    4171:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_weaklistoffset */</span>
<a name="4172" /><a href="dictobject.c.html#4172"><span class="True">    4172:</span></a>     <span class="f">(</span><span class="b">getiterfunc</span><span class="f">)</span><span class="b">dictkeys_iter</span><span class="f">,</span>                 <span class="k">/* tp_iter */</span>
<a name="4173" /><a href="dictobject.c.html#4173"><span class="True">    4173:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_iternext */</span>
<a name="4174" /><a href="dictobject.c.html#4174"><span class="True">    4174:</span></a>     <span class="b">dictkeys_methods</span><span class="f">,</span>                           <span class="k">/* tp_methods */</span>
<a name="4175" /><a href="dictobject.c.html#4175"><span class="True">    4175:</span></a>     <span class="c">0</span><span class="f">,</span>
<a name="4176" /><a href="dictobject.c.html#4176"><span class="True">    4176:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="4177" /><span class="True">    4177:</span> 
<a name="4178" /><a href="dictobject.c.html#4178"><span class="True">    4178:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="4179" /><a href="dictobject.c.html#4179"><span class="True">    4179:</span></a> <span class="b">dictkeys_new</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">)</span>
<a name="4180" /><a href="dictobject.c.html#4180"><span class="True">    4180:</span></a> <span class="f">{</span>
<a name="4181" /><a href="dictobject.c.html#4181"><span class="True">    4181:</span></a>     <span class="m">return</span> <span class="b">_PyDictView_New</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyDictKeys_Type</span><span class="f">)</span><span class="f">;</span>
<a name="4182" /><a href="dictobject.c.html#4182"><span class="True">    4182:</span></a> <span class="f">}</span>
<a name="4183" /><span class="True">    4183:</span> 
<a name="4184" /><span class="True">    4184:</span> <span class="k">/*** dict_items ***/</span>
<a name="4185" /><span class="True">    4185:</span> 
<a name="4186" /><a href="dictobject.c.html#4186"><span class="True">    4186:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="4187" /><a href="dictobject.c.html#4187"><span class="True">    4187:</span></a> <span class="b">dictitems_iter</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">)</span>
<a name="4188" /><a href="dictobject.c.html#4188"><span class="True">    4188:</span></a> <span class="f">{</span>
<a name="4189" /><a href="dictobject.c.html#4189"><span class="True">    4189:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4190" /><a href="dictobject.c.html#4190"><span class="True">    4190:</span></a>         <a href="macros_ref.html#_UHlfUkVUVVJOX05PTkVfMA__"><span class="b">Py_RETURN_NONE</span></a><span class="f">;</span>
<a name="4191" /><a href="dictobject.c.html#4191"><span class="True">    4191:</span></a>     <span class="f">}</span>
<a name="4192" /><a href="dictobject.c.html#4192"><span class="True">    4192:</span></a>     <span class="m">return</span> <span class="b">dictiter_new</span><span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyDictIterItem_Type</span><span class="f">)</span><span class="f">;</span>
<a name="4193" /><a href="dictobject.c.html#4193"><span class="True">    4193:</span></a> <span class="f">}</span>
<a name="4194" /><span class="True">    4194:</span> 
<a name="4195" /><a href="dictobject.c.html#4195"><span class="True">    4195:</span></a> <span class="m">static</span> <span class="m">int</span>
<a name="4196" /><a href="dictobject.c.html#4196"><span class="True">    4196:</span></a> <span class="b">dictitems_contains</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">obj</span><span class="f">)</span>
<a name="4197" /><a href="dictobject.c.html#4197"><span class="True">    4197:</span></a> <span class="f">{</span>
<a name="4198" /><a href="dictobject.c.html#4198"><span class="True">    4198:</span></a>     <span class="m">int</span> <span class="b">result</span><span class="f">;</span>
<a name="4199" /><a href="dictobject.c.html#4199"><span class="True">    4199:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="f">*</span><span class="b">value</span><span class="f">,</span> <span class="f">*</span><span class="b">found</span><span class="f">;</span>
<a name="4200" /><a href="dictobject.c.html#4200"><span class="True">    4200:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="4201" /><a href="dictobject.c.html#4201"><span class="True">    4201:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="4202" /><a href="dictobject.c.html#4202"><span class="True">    4202:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><a href="macros_ref.html#_UHlUdXBsZV9DaGVja18w"><span class="b">PyTuple_Check</span></a><span class="f">(</span><span class="b">obj</span><span class="f">)</span> <span class="f">||</span> <a href="macros_ref.html#_UHlUdXBsZV9HRVRfU0laRV8w"><span class="b">PyTuple_GET_SIZE</span></a><span class="f">(</span><span class="b">obj</span><span class="f">)</span> <span class="f">!=</span> <span class="c">2</span><span class="f">)</span>
<a name="4203" /><a href="dictobject.c.html#4203"><span class="True">    4203:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="4204" /><a href="dictobject.c.html#4204"><span class="True">    4204:</span></a>     <span class="b">key</span> <span class="f">=</span> <a href="macros_ref.html#_UHlUdXBsZV9HRVRfSVRFTV8w"><span class="b">PyTuple_GET_ITEM</span></a><span class="f">(</span><span class="b">obj</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span><span class="f">;</span>
<a name="4205" /><a href="dictobject.c.html#4205"><span class="True">    4205:</span></a>     <span class="b">value</span> <span class="f">=</span> <a href="macros_ref.html#_UHlUdXBsZV9HRVRfSVRFTV8w"><span class="b">PyTuple_GET_ITEM</span></a><span class="f">(</span><span class="b">obj</span><span class="f">,</span> <span class="c">1</span><span class="f">)</span><span class="f">;</span>
<a name="4206" /><a href="dictobject.c.html#4206"><span class="True">    4206:</span></a>     <span class="b">found</span> <span class="f">=</span> <span class="b">PyDict_GetItemWithError</span><span class="f">(</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="4207" /><a href="dictobject.c.html#4207"><span class="True">    4207:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">found</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4208" /><a href="dictobject.c.html#4208"><span class="True">    4208:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="4209" /><a href="dictobject.c.html#4209"><span class="True">    4209:</span></a>             <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="4210" /><a href="dictobject.c.html#4210"><span class="True">    4210:</span></a>         <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="4211" /><a href="dictobject.c.html#4211"><span class="True">    4211:</span></a>     <span class="f">}</span>
<a name="4212" /><a href="dictobject.c.html#4212"><span class="True">    4212:</span></a>     <a href="macros_ref.html#_UHlfSU5DUkVGXzA_"><span class="b">Py_INCREF</span></a><span class="f">(</span><span class="b">found</span><span class="f">)</span><span class="f">;</span>
<a name="4213" /><a href="dictobject.c.html#4213"><span class="True">    4213:</span></a>     <span class="b">result</span> <span class="f">=</span> <span class="b">PyObject_RichCompareBool</span><span class="f">(</span><span class="b">value</span><span class="f">,</span> <span class="b">found</span><span class="f">,</span> <a href="macros_ref.html#_UHlfRVFfMA__"><span class="b">Py_EQ</span></a><span class="f">)</span><span class="f">;</span>
<a name="4214" /><a href="dictobject.c.html#4214"><span class="True">    4214:</span></a>     <a href="macros_ref.html#_UHlfREVDUkVGXzA_"><span class="b">Py_DECREF</span></a><span class="f">(</span><span class="b">found</span><span class="f">)</span><span class="f">;</span>
<a name="4215" /><a href="dictobject.c.html#4215"><span class="True">    4215:</span></a>     <span class="m">return</span> <span class="b">result</span><span class="f">;</span>
<a name="4216" /><a href="dictobject.c.html#4216"><span class="True">    4216:</span></a> <span class="f">}</span>
<a name="4217" /><span class="True">    4217:</span> 
<a name="4218" /><a href="dictobject.c.html#4218"><span class="True">    4218:</span></a> <span class="m">static</span> <span class="b">PySequenceMethods</span> <span class="b">dictitems_as_sequence</span> <span class="f">=</span> <span class="f">{</span>
<a name="4219" /><a href="dictobject.c.html#4219"><span class="True">    4219:</span></a>     <span class="f">(</span><span class="b">lenfunc</span><span class="f">)</span><span class="b">dictview_len</span><span class="f">,</span>              <span class="k">/* sq_length */</span>
<a name="4220" /><a href="dictobject.c.html#4220"><span class="True">    4220:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_concat */</span>
<a name="4221" /><a href="dictobject.c.html#4221"><span class="True">    4221:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_repeat */</span>
<a name="4222" /><a href="dictobject.c.html#4222"><span class="True">    4222:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_item */</span>
<a name="4223" /><a href="dictobject.c.html#4223"><span class="True">    4223:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_slice */</span>
<a name="4224" /><a href="dictobject.c.html#4224"><span class="True">    4224:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_ass_item */</span>
<a name="4225" /><a href="dictobject.c.html#4225"><span class="True">    4225:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_ass_slice */</span>
<a name="4226" /><a href="dictobject.c.html#4226"><span class="True">    4226:</span></a>     <span class="f">(</span><span class="b">objobjproc</span><span class="f">)</span><span class="b">dictitems_contains</span><span class="f">,</span>     <span class="k">/* sq_contains */</span>
<a name="4227" /><a href="dictobject.c.html#4227"><span class="True">    4227:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="4228" /><span class="True">    4228:</span> 
<a name="4229" /><a href="dictobject.c.html#4229"><span class="True">    4229:</span></a> <span class="m">static</span> <span class="b">PyMethodDef</span> <span class="b">dictitems_methods</span><span class="f">[</span><span class="f">]</span> <span class="f">=</span> <span class="f">{</span>
<a name="4230" /><a href="dictobject.c.html#4230"><span class="True">    4230:</span></a>     <span class="f">{</span><span class="e">&quot;isdisjoint&quot;</span><span class="f">,</span>      <span class="f">(</span><span class="b">PyCFunction</span><span class="f">)</span><span class="b">dictviews_isdisjoint</span><span class="f">,</span>  <a href="macros_ref.html#_TUVUSF9PXzA_"><span class="b">METH_O</span></a><span class="f">,</span>
<a name="4231" /><a href="dictobject.c.html#4231"><span class="True">    4231:</span></a>      <span class="b">isdisjoint_doc</span><span class="f">}</span><span class="f">,</span>
<a name="4232" /><a href="dictobject.c.html#4232"><span class="True">    4232:</span></a>     <span class="f">{</span><a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span>              <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">}</span>           <span class="k">/* sentinel */</span>
<a name="4233" /><a href="dictobject.c.html#4233"><span class="True">    4233:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="4234" /><span class="True">    4234:</span> 
<a name="4235" /><a href="dictobject.c.html#4235"><span class="True">    4235:</span></a> <span class="b">PyTypeObject</span> <span class="b">PyDictItems_Type</span> <span class="f">=</span> <span class="f">{</span>
<a name="4236" /><a href="dictobject.c.html#4236"><span class="True">    4236:</span></a>     <a href="macros_ref.html#_UHlWYXJPYmplY3RfSEVBRF9JTklUXzA_"><span class="b">PyVarObject_HEAD_INIT</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">PyType_Type</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="4237" /><a href="dictobject.c.html#4237"><span class="True">    4237:</span></a>     <span class="e">&quot;dict_items&quot;</span><span class="f">,</span>                               <span class="k">/* tp_name */</span>
<a name="4238" /><a href="dictobject.c.html#4238"><span class="True">    4238:</span></a>     <span class="m">sizeof</span><span class="f">(</span><span class="b">_PyDictViewObject</span><span class="f">)</span><span class="f">,</span>                  <span class="k">/* tp_basicsize */</span>
<a name="4239" /><a href="dictobject.c.html#4239"><span class="True">    4239:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_itemsize */</span>
<a name="4240" /><span class="True">    4240:</span>     <span class="k">/* methods */</span>
<a name="4241" /><a href="dictobject.c.html#4241"><span class="True">    4241:</span></a>     <span class="f">(</span><span class="b">destructor</span><span class="f">)</span><span class="b">dictview_dealloc</span><span class="f">,</span>               <span class="k">/* tp_dealloc */</span>
<a name="4242" /><a href="dictobject.c.html#4242"><span class="True">    4242:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_print */</span>
<a name="4243" /><a href="dictobject.c.html#4243"><span class="True">    4243:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_getattr */</span>
<a name="4244" /><a href="dictobject.c.html#4244"><span class="True">    4244:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattr */</span>
<a name="4245" /><a href="dictobject.c.html#4245"><span class="True">    4245:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_reserved */</span>
<a name="4246" /><a href="dictobject.c.html#4246"><span class="True">    4246:</span></a>     <span class="f">(</span><span class="b">reprfunc</span><span class="f">)</span><span class="b">dictview_repr</span><span class="f">,</span>                    <span class="k">/* tp_repr */</span>
<a name="4247" /><a href="dictobject.c.html#4247"><span class="True">    4247:</span></a>     <span class="f">&amp;</span><span class="b">dictviews_as_number</span><span class="f">,</span>                       <span class="k">/* tp_as_number */</span>
<a name="4248" /><a href="dictobject.c.html#4248"><span class="True">    4248:</span></a>     <span class="f">&amp;</span><span class="b">dictitems_as_sequence</span><span class="f">,</span>                     <span class="k">/* tp_as_sequence */</span>
<a name="4249" /><a href="dictobject.c.html#4249"><span class="True">    4249:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_mapping */</span>
<a name="4250" /><a href="dictobject.c.html#4250"><span class="True">    4250:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_hash */</span>
<a name="4251" /><a href="dictobject.c.html#4251"><span class="True">    4251:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_call */</span>
<a name="4252" /><a href="dictobject.c.html#4252"><span class="True">    4252:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_str */</span>
<a name="4253" /><a href="dictobject.c.html#4253"><span class="True">    4253:</span></a>     <span class="b">PyObject_GenericGetAttr</span><span class="f">,</span>                    <span class="k">/* tp_getattro */</span>
<a name="4254" /><a href="dictobject.c.html#4254"><span class="True">    4254:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattro */</span>
<a name="4255" /><a href="dictobject.c.html#4255"><span class="True">    4255:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_buffer */</span>
<a name="4256" /><a href="dictobject.c.html#4256"><span class="True">    4256:</span></a>     <a href="macros_ref.html#_UHlfVFBGTEFHU19ERUZBVUxUXzA_"><span class="b">Py_TPFLAGS_DEFAULT</span></a> <span class="f">|</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19IQVZFX0dDXzA_"><span class="b">Py_TPFLAGS_HAVE_GC</span></a><span class="f">,</span><span class="k">/* tp_flags */</span>
<a name="4257" /><a href="dictobject.c.html#4257"><span class="True">    4257:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_doc */</span>
<a name="4258" /><a href="dictobject.c.html#4258"><span class="True">    4258:</span></a>     <span class="f">(</span><span class="b">traverseproc</span><span class="f">)</span><span class="b">dictview_traverse</span><span class="f">,</span>            <span class="k">/* tp_traverse */</span>
<a name="4259" /><a href="dictobject.c.html#4259"><span class="True">    4259:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_clear */</span>
<a name="4260" /><a href="dictobject.c.html#4260"><span class="True">    4260:</span></a>     <span class="b">dictview_richcompare</span><span class="f">,</span>                       <span class="k">/* tp_richcompare */</span>
<a name="4261" /><a href="dictobject.c.html#4261"><span class="True">    4261:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_weaklistoffset */</span>
<a name="4262" /><a href="dictobject.c.html#4262"><span class="True">    4262:</span></a>     <span class="f">(</span><span class="b">getiterfunc</span><span class="f">)</span><span class="b">dictitems_iter</span><span class="f">,</span>                <span class="k">/* tp_iter */</span>
<a name="4263" /><a href="dictobject.c.html#4263"><span class="True">    4263:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_iternext */</span>
<a name="4264" /><a href="dictobject.c.html#4264"><span class="True">    4264:</span></a>     <span class="b">dictitems_methods</span><span class="f">,</span>                          <span class="k">/* tp_methods */</span>
<a name="4265" /><a href="dictobject.c.html#4265"><span class="True">    4265:</span></a>     <span class="c">0</span><span class="f">,</span>
<a name="4266" /><a href="dictobject.c.html#4266"><span class="True">    4266:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="4267" /><span class="True">    4267:</span> 
<a name="4268" /><a href="dictobject.c.html#4268"><span class="True">    4268:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="4269" /><a href="dictobject.c.html#4269"><span class="True">    4269:</span></a> <span class="b">dictitems_new</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">)</span>
<a name="4270" /><a href="dictobject.c.html#4270"><span class="True">    4270:</span></a> <span class="f">{</span>
<a name="4271" /><a href="dictobject.c.html#4271"><span class="True">    4271:</span></a>     <span class="m">return</span> <span class="b">_PyDictView_New</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyDictItems_Type</span><span class="f">)</span><span class="f">;</span>
<a name="4272" /><a href="dictobject.c.html#4272"><span class="True">    4272:</span></a> <span class="f">}</span>
<a name="4273" /><span class="True">    4273:</span> 
<a name="4274" /><span class="True">    4274:</span> <span class="k">/*** dict_values ***/</span>
<a name="4275" /><span class="True">    4275:</span> 
<a name="4276" /><a href="dictobject.c.html#4276"><span class="True">    4276:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="4277" /><a href="dictobject.c.html#4277"><span class="True">    4277:</span></a> <span class="b">dictvalues_iter</span><span class="f">(</span><span class="b">_PyDictViewObject</span> <span class="f">*</span><span class="b">dv</span><span class="f">)</span>
<a name="4278" /><a href="dictobject.c.html#4278"><span class="True">    4278:</span></a> <span class="f">{</span>
<a name="4279" /><a href="dictobject.c.html#4279"><span class="True">    4279:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4280" /><a href="dictobject.c.html#4280"><span class="True">    4280:</span></a>         <a href="macros_ref.html#_UHlfUkVUVVJOX05PTkVfMA__"><span class="b">Py_RETURN_NONE</span></a><span class="f">;</span>
<a name="4281" /><a href="dictobject.c.html#4281"><span class="True">    4281:</span></a>     <span class="f">}</span>
<a name="4282" /><a href="dictobject.c.html#4282"><span class="True">    4282:</span></a>     <span class="m">return</span> <span class="b">dictiter_new</span><span class="f">(</span><span class="b">dv</span><span class="f">-&gt;</span><span class="b">dv_dict</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyDictIterValue_Type</span><span class="f">)</span><span class="f">;</span>
<a name="4283" /><a href="dictobject.c.html#4283"><span class="True">    4283:</span></a> <span class="f">}</span>
<a name="4284" /><span class="True">    4284:</span> 
<a name="4285" /><a href="dictobject.c.html#4285"><span class="True">    4285:</span></a> <span class="m">static</span> <span class="b">PySequenceMethods</span> <span class="b">dictvalues_as_sequence</span> <span class="f">=</span> <span class="f">{</span>
<a name="4286" /><a href="dictobject.c.html#4286"><span class="True">    4286:</span></a>     <span class="f">(</span><span class="b">lenfunc</span><span class="f">)</span><span class="b">dictview_len</span><span class="f">,</span>              <span class="k">/* sq_length */</span>
<a name="4287" /><a href="dictobject.c.html#4287"><span class="True">    4287:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_concat */</span>
<a name="4288" /><a href="dictobject.c.html#4288"><span class="True">    4288:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_repeat */</span>
<a name="4289" /><a href="dictobject.c.html#4289"><span class="True">    4289:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_item */</span>
<a name="4290" /><a href="dictobject.c.html#4290"><span class="True">    4290:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_slice */</span>
<a name="4291" /><a href="dictobject.c.html#4291"><span class="True">    4291:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_ass_item */</span>
<a name="4292" /><a href="dictobject.c.html#4292"><span class="True">    4292:</span></a>     <span class="c">0</span><span class="f">,</span>                                  <span class="k">/* sq_ass_slice */</span>
<a name="4293" /><a href="dictobject.c.html#4293"><span class="True">    4293:</span></a>     <span class="f">(</span><span class="b">objobjproc</span><span class="f">)</span><span class="c">0</span><span class="f">,</span>                      <span class="k">/* sq_contains */</span>
<a name="4294" /><a href="dictobject.c.html#4294"><span class="True">    4294:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="4295" /><span class="True">    4295:</span> 
<a name="4296" /><a href="dictobject.c.html#4296"><span class="True">    4296:</span></a> <span class="m">static</span> <span class="b">PyMethodDef</span> <span class="b">dictvalues_methods</span><span class="f">[</span><span class="f">]</span> <span class="f">=</span> <span class="f">{</span>
<a name="4297" /><a href="dictobject.c.html#4297"><span class="True">    4297:</span></a>     <span class="f">{</span><a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">,</span>              <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">}</span>           <span class="k">/* sentinel */</span>
<a name="4298" /><a href="dictobject.c.html#4298"><span class="True">    4298:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="4299" /><span class="True">    4299:</span> 
<a name="4300" /><a href="dictobject.c.html#4300"><span class="True">    4300:</span></a> <span class="b">PyTypeObject</span> <span class="b">PyDictValues_Type</span> <span class="f">=</span> <span class="f">{</span>
<a name="4301" /><a href="dictobject.c.html#4301"><span class="True">    4301:</span></a>     <a href="macros_ref.html#_UHlWYXJPYmplY3RfSEVBRF9JTklUXzA_"><span class="b">PyVarObject_HEAD_INIT</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">PyType_Type</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="4302" /><a href="dictobject.c.html#4302"><span class="True">    4302:</span></a>     <span class="e">&quot;dict_values&quot;</span><span class="f">,</span>                              <span class="k">/* tp_name */</span>
<a name="4303" /><a href="dictobject.c.html#4303"><span class="True">    4303:</span></a>     <span class="m">sizeof</span><span class="f">(</span><span class="b">_PyDictViewObject</span><span class="f">)</span><span class="f">,</span>                  <span class="k">/* tp_basicsize */</span>
<a name="4304" /><a href="dictobject.c.html#4304"><span class="True">    4304:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_itemsize */</span>
<a name="4305" /><span class="True">    4305:</span>     <span class="k">/* methods */</span>
<a name="4306" /><a href="dictobject.c.html#4306"><span class="True">    4306:</span></a>     <span class="f">(</span><span class="b">destructor</span><span class="f">)</span><span class="b">dictview_dealloc</span><span class="f">,</span>               <span class="k">/* tp_dealloc */</span>
<a name="4307" /><a href="dictobject.c.html#4307"><span class="True">    4307:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_print */</span>
<a name="4308" /><a href="dictobject.c.html#4308"><span class="True">    4308:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_getattr */</span>
<a name="4309" /><a href="dictobject.c.html#4309"><span class="True">    4309:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattr */</span>
<a name="4310" /><a href="dictobject.c.html#4310"><span class="True">    4310:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_reserved */</span>
<a name="4311" /><a href="dictobject.c.html#4311"><span class="True">    4311:</span></a>     <span class="f">(</span><span class="b">reprfunc</span><span class="f">)</span><span class="b">dictview_repr</span><span class="f">,</span>                    <span class="k">/* tp_repr */</span>
<a name="4312" /><a href="dictobject.c.html#4312"><span class="True">    4312:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_number */</span>
<a name="4313" /><a href="dictobject.c.html#4313"><span class="True">    4313:</span></a>     <span class="f">&amp;</span><span class="b">dictvalues_as_sequence</span><span class="f">,</span>                    <span class="k">/* tp_as_sequence */</span>
<a name="4314" /><a href="dictobject.c.html#4314"><span class="True">    4314:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_mapping */</span>
<a name="4315" /><a href="dictobject.c.html#4315"><span class="True">    4315:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_hash */</span>
<a name="4316" /><a href="dictobject.c.html#4316"><span class="True">    4316:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_call */</span>
<a name="4317" /><a href="dictobject.c.html#4317"><span class="True">    4317:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_str */</span>
<a name="4318" /><a href="dictobject.c.html#4318"><span class="True">    4318:</span></a>     <span class="b">PyObject_GenericGetAttr</span><span class="f">,</span>                    <span class="k">/* tp_getattro */</span>
<a name="4319" /><a href="dictobject.c.html#4319"><span class="True">    4319:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_setattro */</span>
<a name="4320" /><a href="dictobject.c.html#4320"><span class="True">    4320:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_as_buffer */</span>
<a name="4321" /><a href="dictobject.c.html#4321"><span class="True">    4321:</span></a>     <a href="macros_ref.html#_UHlfVFBGTEFHU19ERUZBVUxUXzA_"><span class="b">Py_TPFLAGS_DEFAULT</span></a> <span class="f">|</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19IQVZFX0dDXzA_"><span class="b">Py_TPFLAGS_HAVE_GC</span></a><span class="f">,</span><span class="k">/* tp_flags */</span>
<a name="4322" /><a href="dictobject.c.html#4322"><span class="True">    4322:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_doc */</span>
<a name="4323" /><a href="dictobject.c.html#4323"><span class="True">    4323:</span></a>     <span class="f">(</span><span class="b">traverseproc</span><span class="f">)</span><span class="b">dictview_traverse</span><span class="f">,</span>            <span class="k">/* tp_traverse */</span>
<a name="4324" /><a href="dictobject.c.html#4324"><span class="True">    4324:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_clear */</span>
<a name="4325" /><a href="dictobject.c.html#4325"><span class="True">    4325:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_richcompare */</span>
<a name="4326" /><a href="dictobject.c.html#4326"><span class="True">    4326:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_weaklistoffset */</span>
<a name="4327" /><a href="dictobject.c.html#4327"><span class="True">    4327:</span></a>     <span class="f">(</span><span class="b">getiterfunc</span><span class="f">)</span><span class="b">dictvalues_iter</span><span class="f">,</span>               <span class="k">/* tp_iter */</span>
<a name="4328" /><a href="dictobject.c.html#4328"><span class="True">    4328:</span></a>     <span class="c">0</span><span class="f">,</span>                                          <span class="k">/* tp_iternext */</span>
<a name="4329" /><a href="dictobject.c.html#4329"><span class="True">    4329:</span></a>     <span class="b">dictvalues_methods</span><span class="f">,</span>                         <span class="k">/* tp_methods */</span>
<a name="4330" /><a href="dictobject.c.html#4330"><span class="True">    4330:</span></a>     <span class="c">0</span><span class="f">,</span>
<a name="4331" /><a href="dictobject.c.html#4331"><span class="True">    4331:</span></a> <span class="f">}</span><span class="f">;</span>
<a name="4332" /><span class="True">    4332:</span> 
<a name="4333" /><a href="dictobject.c.html#4333"><span class="True">    4333:</span></a> <span class="m">static</span> <span class="b">PyObject</span> <span class="f">*</span>
<a name="4334" /><a href="dictobject.c.html#4334"><span class="True">    4334:</span></a> <span class="b">dictvalues_new</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">)</span>
<a name="4335" /><a href="dictobject.c.html#4335"><span class="True">    4335:</span></a> <span class="f">{</span>
<a name="4336" /><a href="dictobject.c.html#4336"><span class="True">    4336:</span></a>     <span class="m">return</span> <span class="b">_PyDictView_New</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="f">&amp;</span><span class="b">PyDictValues_Type</span><span class="f">)</span><span class="f">;</span>
<a name="4337" /><a href="dictobject.c.html#4337"><span class="True">    4337:</span></a> <span class="f">}</span>
<a name="4338" /><span class="True">    4338:</span> 
<a name="4339" /><span class="True">    4339:</span> <span class="k">/* Returns NULL if cannot allocate a new PyDictKeysObject,</span>
<a name="4340" /><span class="True">    4340:</span> <span class="k">   but does not set an error */</span>
<a name="4341" /><a href="dictobject.c.html#4341"><span class="True">    4341:</span></a> <span class="b">PyDictKeysObject</span> <span class="f">*</span>
<a name="4342" /><a href="dictobject.c.html#4342"><span class="True">    4342:</span></a> <span class="b">_PyDict_NewKeysForClass</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="4343" /><a href="dictobject.c.html#4343"><span class="True">    4343:</span></a> <span class="f">{</span>
<a name="4344" /><a href="dictobject.c.html#4344"><span class="True">    4344:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span> <span class="f">=</span> <span class="b">new_keys_object</span><span class="f">(</span><a href="macros_ref.html#_UHlEaWN0X01JTlNJWkVfMA__"><span class="b">PyDict_MINSIZE</span></a><span class="f">)</span><span class="f">;</span>
<a name="4345" /><a href="dictobject.c.html#4345"><span class="True">    4345:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">keys</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="4346" /><a href="dictobject.c.html#4346"><span class="True">    4346:</span></a>         <span class="b">PyErr_Clear</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="4347" /><a href="dictobject.c.html#4347"><span class="True">    4347:</span></a>     <span class="m">else</span>
<a name="4348" /><a href="dictobject.c.html#4348"><span class="True">    4348:</span></a>         <span class="b">keys</span><span class="f">-&gt;</span><span class="b">dk_lookup</span> <span class="f">=</span> <span class="b">lookdict_split</span><span class="f">;</span>
<a name="4349" /><a href="dictobject.c.html#4349"><span class="True">    4349:</span></a>     <span class="m">return</span> <span class="b">keys</span><span class="f">;</span>
<a name="4350" /><a href="dictobject.c.html#4350"><span class="True">    4350:</span></a> <span class="f">}</span>
<a name="4351" /><span class="True">    4351:</span> 
<a name="4352" /><span class="True">    4352:</span> <span class="f">#</span><span class="n">define</span> <a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span> <span class="f">(</span><span class="f">(</span><span class="f">(</span><span class="b">PyHeapTypeObject</span><span class="f">*</span><span class="f">)</span><span class="b">tp</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ht_cached_keys</span><span class="f">)</span>
<a name="4353" /><span class="True">    4353:</span> 
<a name="4354" /><a href="dictobject.c.html#4354"><span class="True">    4354:</span></a> <span class="b">PyObject</span> <span class="f">*</span>
<a name="4355" /><a href="dictobject.c.html#4355"><span class="True">    4355:</span></a> <span class="b">PyObject_GenericGetDict</span><span class="f">(</span><span class="b">PyObject</span> <span class="f">*</span><span class="b">obj</span><span class="f">,</span> <span class="m">void</span> <span class="f">*</span><span class="b">context</span><span class="f">)</span>
<a name="4356" /><a href="dictobject.c.html#4356"><span class="True">    4356:</span></a> <span class="f">{</span>
<a name="4357" /><a href="dictobject.c.html#4357"><span class="True">    4357:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">,</span> <span class="f">*</span><span class="f">*</span><span class="b">dictptr</span> <span class="f">=</span> <span class="b">_PyObject_GetDictPtr</span><span class="f">(</span><span class="b">obj</span><span class="f">)</span><span class="f">;</span>
<a name="4358" /><a href="dictobject.c.html#4358"><span class="True">    4358:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dictptr</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4359" /><a href="dictobject.c.html#4359"><span class="True">    4359:</span></a>         <span class="b">PyErr_SetString</span><span class="f">(</span><span class="b">PyExc_AttributeError</span><span class="f">,</span>
<a name="4360" /><a href="dictobject.c.html#4360"><span class="True">    4360:</span></a>                         <span class="e">&quot;This object has no __dict__&quot;</span><span class="f">)</span><span class="f">;</span>
<a name="4361" /><a href="dictobject.c.html#4361"><span class="True">    4361:</span></a>         <span class="m">return</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4362" /><a href="dictobject.c.html#4362"><span class="True">    4362:</span></a>     <span class="f">}</span>
<a name="4363" /><a href="dictobject.c.html#4363"><span class="True">    4363:</span></a>     <span class="b">dict</span> <span class="f">=</span> <span class="f">*</span><span class="b">dictptr</span><span class="f">;</span>
<a name="4364" /><a href="dictobject.c.html#4364"><span class="True">    4364:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="b">dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4365" /><a href="dictobject.c.html#4365"><span class="True">    4365:</span></a>         <span class="b">PyTypeObject</span> <span class="f">*</span><span class="b">tp</span> <span class="f">=</span> <a href="macros_ref.html#_UHlfVFlQRV8w"><span class="b">Py_TYPE</span></a><span class="f">(</span><span class="b">obj</span><span class="f">)</span><span class="f">;</span>
<a name="4366" /><a href="dictobject.c.html#4366"><span class="True">    4366:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="b">tp</span><span class="f">-&gt;</span><span class="b">tp_flags</span> <span class="f">&amp;</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19IRUFQVFlQRV8w"><span class="b">Py_TPFLAGS_HEAPTYPE</span></a><span class="f">)</span> <span class="f">&amp;&amp;</span> <a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="4367" /><a href="dictobject.c.html#4367"><span class="True">    4367:</span></a>             <a href="macros_ref.html#_REtfSU5DUkVGXzA_"><span class="b">DK_INCREF</span></a><span class="f">(</span><a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="4368" /><a href="dictobject.c.html#4368"><span class="True">    4368:</span></a>             <span class="f">*</span><span class="b">dictptr</span> <span class="f">=</span> <span class="b">dict</span> <span class="f">=</span> <span class="b">new_dict_with_shared_keys</span><span class="f">(</span><a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span><span class="f">)</span><span class="f">;</span>
<a name="4369" /><a href="dictobject.c.html#4369"><span class="True">    4369:</span></a>         <span class="f">}</span>
<a name="4370" /><a href="dictobject.c.html#4370"><span class="True">    4370:</span></a>         <span class="m">else</span> <span class="f">{</span>
<a name="4371" /><a href="dictobject.c.html#4371"><span class="True">    4371:</span></a>             <span class="f">*</span><span class="b">dictptr</span> <span class="f">=</span> <span class="b">dict</span> <span class="f">=</span> <span class="b">PyDict_New</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="4372" /><a href="dictobject.c.html#4372"><span class="True">    4372:</span></a>         <span class="f">}</span>
<a name="4373" /><a href="dictobject.c.html#4373"><span class="True">    4373:</span></a>     <span class="f">}</span>
<a name="4374" /><a href="dictobject.c.html#4374"><span class="True">    4374:</span></a>     <a href="macros_ref.html#_UHlfWElOQ1JFRl8w"><span class="b">Py_XINCREF</span></a><span class="f">(</span><span class="b">dict</span><span class="f">)</span><span class="f">;</span>
<a name="4375" /><a href="dictobject.c.html#4375"><span class="True">    4375:</span></a>     <span class="m">return</span> <span class="b">dict</span><span class="f">;</span>
<a name="4376" /><a href="dictobject.c.html#4376"><span class="True">    4376:</span></a> <span class="f">}</span>
<a name="4377" /><span class="True">    4377:</span> 
<a name="4378" /><a href="dictobject.c.html#4378"><span class="True">    4378:</span></a> <span class="m">int</span>
<a name="4379" /><a href="dictobject.c.html#4379"><span class="True">    4379:</span></a> <span class="b">_PyObjectDict_SetItem</span><span class="f">(</span><span class="b">PyTypeObject</span> <span class="f">*</span><span class="b">tp</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="f">*</span><span class="b">dictptr</span><span class="f">,</span>
<a name="4380" /><a href="dictobject.c.html#4380"><span class="True">    4380:</span></a>                       <span class="b">PyObject</span> <span class="f">*</span><span class="b">key</span><span class="f">,</span> <span class="b">PyObject</span> <span class="f">*</span><span class="b">value</span><span class="f">)</span>
<a name="4381" /><a href="dictobject.c.html#4381"><span class="True">    4381:</span></a> <span class="f">{</span>
<a name="4382" /><a href="dictobject.c.html#4382"><span class="True">    4382:</span></a>     <span class="b">PyObject</span> <span class="f">*</span><span class="b">dict</span><span class="f">;</span>
<a name="4383" /><a href="dictobject.c.html#4383"><span class="True">    4383:</span></a>     <span class="m">int</span> <span class="b">res</span><span class="f">;</span>
<a name="4384" /><a href="dictobject.c.html#4384"><span class="True">    4384:</span></a>     <span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">cached</span><span class="f">;</span>
<a name="4385" /><span class="True">    4385:</span> 
<a name="4386" /><a href="dictobject.c.html#4386"><span class="True">    4386:</span></a>     <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">dictptr</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="4387" /><a href="dictobject.c.html#4387"><span class="True">    4387:</span></a>     <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="b">tp</span><span class="f">-&gt;</span><span class="b">tp_flags</span> <span class="f">&amp;</span> <a href="macros_ref.html#_UHlfVFBGTEFHU19IRUFQVFlQRV8w"><span class="b">Py_TPFLAGS_HEAPTYPE</span></a><span class="f">)</span> <span class="f">&amp;&amp;</span> <span class="f">(</span><span class="b">cached</span> <span class="f">=</span> <a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="4388" /><a href="dictobject.c.html#4388"><span class="True">    4388:</span></a>         <a href="macros_ref.html#_YXNzZXJ0XzA_"><span class="b">assert</span></a><span class="f">(</span><span class="b">dictptr</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span><span class="f">;</span>
<a name="4389" /><a href="dictobject.c.html#4389"><span class="True">    4389:</span></a>         <span class="b">dict</span> <span class="f">=</span> <span class="f">*</span><span class="b">dictptr</span><span class="f">;</span>
<a name="4390" /><a href="dictobject.c.html#4390"><span class="True">    4390:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4391" /><a href="dictobject.c.html#4391"><span class="True">    4391:</span></a>             <a href="macros_ref.html#_REtfSU5DUkVGXzA_"><span class="b">DK_INCREF</span></a><span class="f">(</span><span class="b">cached</span><span class="f">)</span><span class="f">;</span>
<a name="4392" /><a href="dictobject.c.html#4392"><span class="True">    4392:</span></a>             <span class="b">dict</span> <span class="f">=</span> <span class="b">new_dict_with_shared_keys</span><span class="f">(</span><span class="b">cached</span><span class="f">)</span><span class="f">;</span>
<a name="4393" /><a href="dictobject.c.html#4393"><span class="True">    4393:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="4394" /><a href="dictobject.c.html#4394"><span class="True">    4394:</span></a>                 <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="4395" /><a href="dictobject.c.html#4395"><span class="True">    4395:</span></a>             <span class="f">*</span><span class="b">dictptr</span> <span class="f">=</span> <span class="b">dict</span><span class="f">;</span>
<a name="4396" /><a href="dictobject.c.html#4396"><span class="True">    4396:</span></a>         <span class="f">}</span>
<a name="4397" /><a href="dictobject.c.html#4397"><span class="True">    4397:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4398" /><a href="dictobject.c.html#4398"><span class="True">    4398:</span></a>             <span class="b">res</span> <span class="f">=</span> <span class="b">PyDict_DelItem</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="4399" /><span class="True">    4399:</span>             <span class="l">// Since key sharing dict doesn&apos;t allow deletion, PyDict_DelItem()</span>
<a name="4400" /><span class="True">    4400:</span>             <span class="l">// always converts dict to combined form.</span>
<a name="4401" /><a href="dictobject.c.html#4401"><span class="True">    4401:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="f">(</span><span class="b">cached</span> <span class="f">=</span> <a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span><span class="f">)</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4402" /><a href="dictobject.c.html#4402"><span class="True">    4402:</span></a>                 <a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4403" /><a href="dictobject.c.html#4403"><span class="True">    4403:</span></a>                 <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">cached</span><span class="f">)</span><span class="f">;</span>
<a name="4404" /><a href="dictobject.c.html#4404"><span class="True">    4404:</span></a>             <span class="f">}</span>
<a name="4405" /><a href="dictobject.c.html#4405"><span class="True">    4405:</span></a>         <span class="f">}</span>
<a name="4406" /><a href="dictobject.c.html#4406"><span class="True">    4406:</span></a>         <span class="m">else</span> <span class="f">{</span>
<a name="4407" /><a href="dictobject.c.html#4407"><span class="True">    4407:</span></a>             <span class="m">int</span> <span class="b">was_shared</span> <span class="f">=</span> <span class="f">(</span><span class="b">cached</span> <span class="f">==</span> <span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dict</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span><span class="f">;</span>
<a name="4408" /><a href="dictobject.c.html#4408"><span class="True">    4408:</span></a>             <span class="b">res</span> <span class="f">=</span> <span class="b">PyDict_SetItem</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="4409" /><a href="dictobject.c.html#4409"><span class="True">    4409:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">was_shared</span> <span class="f">&amp;&amp;</span>
<a name="4410" /><a href="dictobject.c.html#4410"><span class="True">    4410:</span></a>                     <span class="f">(</span><span class="b">cached</span> <span class="f">=</span> <a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span><span class="f">)</span> <span class="f">!=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span>
<a name="4411" /><a href="dictobject.c.html#4411"><span class="True">    4411:</span></a>                     <span class="b">cached</span> <span class="f">!=</span> <span class="f">(</span><span class="f">(</span><span class="b">PyDictObject</span> <span class="f">*</span><span class="f">)</span><span class="b">dict</span><span class="f">)</span><span class="f">-&gt;</span><span class="b">ma_keys</span><span class="f">)</span> <span class="f">{</span>
<a name="4412" /><span class="True">    4412:</span>                 <span class="k">/* PyDict_SetItem() may call dictresize and convert split table</span>
<a name="4413" /><span class="True">    4413:</span> <span class="k">                 * into combined table.  In such case, convert it to split</span>
<a name="4414" /><span class="True">    4414:</span> <span class="k">                 * table again and update type&apos;s shared key only when this is</span>
<a name="4415" /><span class="True">    4415:</span> <span class="k">                 * the only dict sharing key with the type.</span>
<a name="4416" /><span class="True">    4416:</span> <span class="k">                 *</span>
<a name="4417" /><span class="True">    4417:</span> <span class="k">                 * This is to allow using shared key in class like this:</span>
<a name="4418" /><span class="True">    4418:</span> <span class="k">                 *</span>
<a name="4419" /><span class="True">    4419:</span> <span class="k">                 *     class C:</span>
<a name="4420" /><span class="True">    4420:</span> <span class="k">                 *         def __init__(self):</span>
<a name="4421" /><span class="True">    4421:</span> <span class="k">                 *             # one dict resize happens</span>
<a name="4422" /><span class="True">    4422:</span> <span class="k">                 *             self.a, self.b, self.c = 1, 2, 3</span>
<a name="4423" /><span class="True">    4423:</span> <span class="k">                 *             self.d, self.e, self.f = 4, 5, 6</span>
<a name="4424" /><span class="True">    4424:</span> <span class="k">                 *     a = C()</span>
<a name="4425" /><span class="True">    4425:</span> <span class="k">                 */</span>
<a name="4426" /><a href="dictobject.c.html#4426"><span class="True">    4426:</span></a>                 <span class="m">if</span> <span class="f">(</span><span class="b">cached</span><span class="f">-&gt;</span><span class="b">dk_refcnt</span> <span class="f">==</span> <span class="c">1</span><span class="f">)</span> <span class="f">{</span>
<a name="4427" /><a href="dictobject.c.html#4427"><span class="True">    4427:</span></a>                     <a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span> <span class="f">=</span> <span class="b">make_keys_shared</span><span class="f">(</span><span class="b">dict</span><span class="f">)</span><span class="f">;</span>
<a name="4428" /><a href="dictobject.c.html#4428"><span class="True">    4428:</span></a>                 <span class="f">}</span>
<a name="4429" /><a href="dictobject.c.html#4429"><span class="True">    4429:</span></a>                 <span class="m">else</span> <span class="f">{</span>
<a name="4430" /><a href="dictobject.c.html#4430"><span class="True">    4430:</span></a>                     <a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span> <span class="f">=</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">;</span>
<a name="4431" /><a href="dictobject.c.html#4431"><span class="True">    4431:</span></a>                 <span class="f">}</span>
<a name="4432" /><a href="dictobject.c.html#4432"><span class="True">    4432:</span></a>                 <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">cached</span><span class="f">)</span><span class="f">;</span>
<a name="4433" /><a href="dictobject.c.html#4433"><span class="True">    4433:</span></a>                 <span class="m">if</span> <span class="f">(</span><a href="macros_ref.html#_Q0FDSEVEX0tFWVNfMA__"><span class="b">CACHED_KEYS</span></a><span class="f">(</span><span class="b">tp</span><span class="f">)</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a> <span class="f">&amp;&amp;</span> <span class="b">PyErr_Occurred</span><span class="f">(</span><span class="f">)</span><span class="f">)</span>
<a name="4434" /><a href="dictobject.c.html#4434"><span class="True">    4434:</span></a>                     <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="4435" /><a href="dictobject.c.html#4435"><span class="True">    4435:</span></a>             <span class="f">}</span>
<a name="4436" /><a href="dictobject.c.html#4436"><span class="True">    4436:</span></a>         <span class="f">}</span>
<a name="4437" /><a href="dictobject.c.html#4437"><span class="True">    4437:</span></a>     <span class="f">}</span> <span class="m">else</span> <span class="f">{</span>
<a name="4438" /><a href="dictobject.c.html#4438"><span class="True">    4438:</span></a>         <span class="b">dict</span> <span class="f">=</span> <span class="f">*</span><span class="b">dictptr</span><span class="f">;</span>
<a name="4439" /><a href="dictobject.c.html#4439"><span class="True">    4439:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4440" /><a href="dictobject.c.html#4440"><span class="True">    4440:</span></a>             <span class="b">dict</span> <span class="f">=</span> <span class="b">PyDict_New</span><span class="f">(</span><span class="f">)</span><span class="f">;</span>
<a name="4441" /><a href="dictobject.c.html#4441"><span class="True">    4441:</span></a>             <span class="m">if</span> <span class="f">(</span><span class="b">dict</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span>
<a name="4442" /><a href="dictobject.c.html#4442"><span class="True">    4442:</span></a>                 <span class="m">return</span> <span class="f">-</span><span class="c">1</span><span class="f">;</span>
<a name="4443" /><a href="dictobject.c.html#4443"><span class="True">    4443:</span></a>             <span class="f">*</span><span class="b">dictptr</span> <span class="f">=</span> <span class="b">dict</span><span class="f">;</span>
<a name="4444" /><a href="dictobject.c.html#4444"><span class="True">    4444:</span></a>         <span class="f">}</span>
<a name="4445" /><a href="dictobject.c.html#4445"><span class="True">    4445:</span></a>         <span class="m">if</span> <span class="f">(</span><span class="b">value</span> <span class="f">==</span> <a href="macros_ref.html#_TlVMTF8w"><span class="b">NULL</span></a><span class="f">)</span> <span class="f">{</span>
<a name="4446" /><a href="dictobject.c.html#4446"><span class="True">    4446:</span></a>             <span class="b">res</span> <span class="f">=</span> <span class="b">PyDict_DelItem</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="b">key</span><span class="f">)</span><span class="f">;</span>
<a name="4447" /><a href="dictobject.c.html#4447"><span class="True">    4447:</span></a>         <span class="f">}</span> <span class="m">else</span> <span class="f">{</span>
<a name="4448" /><a href="dictobject.c.html#4448"><span class="True">    4448:</span></a>             <span class="b">res</span> <span class="f">=</span> <span class="b">PyDict_SetItem</span><span class="f">(</span><span class="b">dict</span><span class="f">,</span> <span class="b">key</span><span class="f">,</span> <span class="b">value</span><span class="f">)</span><span class="f">;</span>
<a name="4449" /><a href="dictobject.c.html#4449"><span class="True">    4449:</span></a>         <span class="f">}</span>
<a name="4450" /><a href="dictobject.c.html#4450"><span class="True">    4450:</span></a>     <span class="f">}</span>
<a name="4451" /><a href="dictobject.c.html#4451"><span class="True">    4451:</span></a>     <span class="m">return</span> <span class="b">res</span><span class="f">;</span>
<a name="4452" /><a href="dictobject.c.html#4452"><span class="True">    4452:</span></a> <span class="f">}</span>
<a name="4453" /><span class="True">    4453:</span> 
<a name="4454" /><a href="dictobject.c.html#4454"><span class="True">    4454:</span></a> <span class="m">void</span>
<a name="4455" /><a href="dictobject.c.html#4455"><span class="True">    4455:</span></a> <span class="b">_PyDictKeys_DecRef</span><span class="f">(</span><span class="b">PyDictKeysObject</span> <span class="f">*</span><span class="b">keys</span><span class="f">)</span>
<a name="4456" /><a href="dictobject.c.html#4456"><span class="True">    4456:</span></a> <span class="f">{</span>
<a name="4457" /><a href="dictobject.c.html#4457"><span class="True">    4457:</span></a>     <a href="macros_ref.html#_REtfREVDUkVGXzA_"><span class="b">DK_DECREF</span></a><span class="f">(</span><span class="b">keys</span><span class="f">)</span><span class="f">;</span>
<a name="4458" /><a href="dictobject.c.html#4458"><span class="True">    4458:</span></a> <span class="f">}</span>
<a name="4459" /><a href="dictobject.c.html#4459"><span class="True">    4459:</span></a> </pre>
  </body>
</html>
